{
struct cec_delayed_work *work;
- CECDBG("%s event %04x delay %d\n", __func__, event, delay);
+ HDMIDBG(1, "%s event %04x delay %d\n", __func__, event, delay);
if (!cec_dev)
return;
&work->work,
msecs_to_jiffies(delay));
} else {
- CECDBG(KERN_WARNING "CEC: Cannot allocate memory\n");
+ HDMIDBG(1, "CEC: Cannot allocate memory\n");
}
}
#ifndef __ROCKCHIP_HDMI_CEC_H__
#define __ROCKCHIP_HDMI_CEC_H__
-#include "rockchip-hdmi.h"
#include <linux/input.h>
#include <linux/miscdevice.h>
+#include "rockchip-hdmi.h"
+
enum {
CEC_LOGADDR_TV = 0x00,
CEC_LOGADDR_RECDEV1 = 0x01,
void (*setceclogicaddr)(struct hdmi *, int);
};
-#ifdef DEBUG
-#define CECDBG(format, ...) \
- pr_info(format, ## __VA_ARGS__)
-#else
-#define CECDBG(format, ...)
-#endif
-/* for HAL ioctl*/
#define HDMI_CEC_MAGIC 'N'
#define HDMI_IOCTL_CECSEND _IOW(HDMI_CEC_MAGIC, 0, struct cec_framedata)
#define HDMI_IOCTL_CECENAB _IOW(HDMI_CEC_MAGIC, 1, int)
{
struct hdmi_delayed_work *work;
- DBG("%s event %04x delay %d sync %d\n",
- __func__, event, delay, sync);
+ HDMIDBG(2, "%s event %04x delay %d sync %d\n",
+ __func__, event, delay, sync);
work = kmalloc(sizeof(*work), GFP_ATOMIC);
static inline void hdmi_wq_set_output(struct hdmi *hdmi, int mute)
{
- DBG("%s mute %d\n", __func__, mute);
+ HDMIDBG(2, "%s mute %d\n", __func__, mute);
if (hdmi->ops->setmute)
hdmi->ops->setmute(hdmi, mute);
}
static inline void hdmi_wq_set_audio(struct hdmi *hdmi)
{
- DBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (hdmi->ops->setaudio)
hdmi->ops->setaudio(hdmi, &hdmi->audio);
}
struct hdmi_video *video = &hdmi->video;
int deepcolor;
- DBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
video->sink_hdmi = hdmi->edid.sink_hdmi;
video->format_3d = hdmi->mode_3d;
if (!hdmi)
return;
- DBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
pedid = &hdmi->edid;
fb_destroy_modelist(&pedid->modelist);
static void hdmi_wq_insert(struct hdmi *hdmi)
{
- DBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (hdmi->ops->insert)
hdmi->ops->insert(hdmi);
hdmi_wq_parse_edid(hdmi);
struct rk_screen screen;
int i;
- DBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (hdmi->ops->remove)
hdmi->ops->remove(hdmi);
if (hdmi->property->feature & SUPPORT_CEC)
mutex_lock(&hdmi->ddev->lock);
- DBG("\nhdmi_work_queue() - evt= %x %d\n",
- (event & 0xFF00) >> 8,
- event & 0xFF);
+ HDMIDBG(2, "\nhdmi_work_queue() - evt= %x %d\n",
+ (event & 0xFF00) >> 8, event & 0xFF);
if ((!hdmi->enable || hdmi->sleep) &&
(event != HDMI_ENABLE_CTL) &&
case HDMI_HPD_CHANGE:
if (hdmi->ops->getstatus)
hpd = hdmi->ops->getstatus(hdmi);
- DBG("hdmi_work_queue() - hpd is %d hotplug is %d\n",
- hpd, hdmi->hotplug);
+ HDMIDBG(2, "hdmi_work_queue() - hpd is %d hotplug is %d\n",
+ hpd, hdmi->hotplug);
if (hpd != hdmi->hotplug) {
if (hpd == HDMI_HPD_ACTIVED) {
hdmi->hotplug = hpd;
if (!hdmi_w->sync)
kfree(hdmi_w);
- DBG("\nhdmi_work_queue() - exit evt= %x %d\n",
- (event & 0xFF00) >> 8,
- event & 0xFF);
+ HDMIDBG(2, "\nhdmi_work_queue() - exit evt= %x %d\n",
+ (event & 0xFF00) >> 8, event & 0xFF);
mutex_unlock(&hdmi->ddev->lock);
}
if (i == HDMI_MAX_ID)
return NULL;
- DBG("hdmi_register() - video source %d display %d\n",
- property->videosrc, property->display);
+ HDMIDBG(2, "hdmi_register() - video source %d display %d\n",
+ property->videosrc, property->display);
hdmi = kmalloc(sizeof(*hdmi), GFP_KERNEL);
if (!hdmi)
#include <linux/string.h>
#include <linux/display-sys.h>
#include <linux/interrupt.h>
+#include <linux/moduleparam.h>
#include "rockchip-hdmi.h"
+int hdmi_dbg_level;
+module_param(hdmi_dbg_level, int, S_IRUGO | S_IWUSR);
+
static int hdmi_get_enable(struct rk_display_device *device)
{
struct hdmi *hdmi = device->priv_data;
#define HDMI_AUDIO_DEFAULT_RATE HDMI_AUDIO_FS_44100
#define HDMI_AUDIO_DEFAULT_WORDLENGTH HDMI_AUDIO_WORD_LENGTH_16bit
-#ifdef DEBUG
-#define DBG(format, ...) \
- pr_info(format, ## __VA_ARGS__)
-#else
-#define DBG(format, ...)
-#endif
+
+extern int hdmi_dbg_level;
+#define HDMIDBG(x, format, ...) do { \
+ if (unlikely(hdmi_dbg_level >= x)) \
+ pr_info(format, ## __VA_ARGS__); \
+ } while (0)
struct hdmi *rockchip_hdmi_register(struct hdmi_property *property,
struct hdmi_ops *ops);
hdmi_readl(hdmi_dev, CEC_RX_LENGTH, &length);
hdmi_writel(hdmi_dev, CEC_RX_OFFSET, 0);
- CECDBG("CEC: %s length is %d\n", __func__, length);
+ HDMIDBG(1, "CEC: %s length is %d\n", __func__, length);
for (i = 0; i < length; i++) {
hdmi_readl(hdmi_dev, CEC_DATA, &val);
data[i] = val;
int i;
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- CECDBG("CEC: TX srcdestaddr %x opcode %x ",
- frame->srcdestaddr, frame->opcode);
+ HDMIDBG(1, "CEC: TX srcdestaddr %x opcode %x ",
+ frame->srcdestaddr, frame->opcode);
if (frame->argcount) {
- DBG("args:");
+ HDMIDBG(1, "args:");
for (i = 0; i < frame->argcount; i++)
- DBG("%02x ", frame->args[i]);
+ HDMIDBG(1, "%02x ", frame->args[i]);
}
- CECDBG("\n");
+ HDMIDBG(1, "\n");
hdmi_writel(hdmi_dev, CEC_TX_OFFSET, 0);
hdmi_writel(hdmi_dev, CEC_DATA, frame->srcdestaddr);
/*Wait for bus free*/
cec.busfree = 1;
hdmi_writel(hdmi_dev, CEC_CTRL, m_BUSFREETIME_ENABLE);
- CECDBG("start wait bus free\n");
+ HDMIDBG(1, "start wait bus free\n");
if (wait_event_interruptible_timeout(cec.wait,
cec.busfree == 0,
msecs_to_jiffies(17)))
return CEC_SEND_BUSY;
- CECDBG("end wait bus free,start tx,busfree=%d\n", cec.busfree);
+ HDMIDBG(1, "end wait bus free,start tx,busfree=%d\n", cec.busfree);
/*Start TX*/
cec.tx_done = 0;
hdmi_writel(hdmi_dev, CEC_CTRL, m_BUSFREETIME_ENABLE | m_START_TX);
cec.tx_done != 0,
msecs_to_jiffies(100)))
hdmi_writel(hdmi_dev, CEC_CTRL, 0);
- CECDBG("end tx,tx_done=%d\n", cec.tx_done);
+ HDMIDBG(1, "end tx,tx_done=%d\n", cec.tx_done);
if (cec.tx_done == 1) {
cec.tx_done = 0;
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- CECDBG("CEC: %s\n", __func__);
+ HDMIDBG(1, "CEC: %s\n", __func__);
hdmi_writel(hdmi_dev, CEC_LOGICADDR, ceclgaddr);
}
hdmi_readl(hdmi_dev, CEC_TX_INT, &tx_isr);
hdmi_readl(hdmi_dev, CEC_RX_INT, &rx_isr);
- CECDBG("CEC: rockchip_hdmiv1_cec_isr:tx_isr %02x rx_isr %02x\n\n",
- tx_isr, rx_isr);
+ HDMIDBG(1, "CEC: rockchip_hdmiv1_cec_isr:tx_isr %02x rx_isr %02x\n\n",
+ tx_isr, rx_isr);
hdmi_writel(hdmi_dev, CEC_TX_INT, tx_isr);
hdmi_writel(hdmi_dev, CEC_RX_INT, rx_isr);
if (tx_isr & m_TX_BUSNOTFREE) {
cec.busfree = 0;
- CECDBG("CEC: m_TX_BUSNOTFREE,busfree=%d\n", cec.busfree);
+ HDMIDBG(1, "CEC: m_TX_BUSNOTFREE,busfree=%d\n", cec.busfree);
} else if (tx_isr & m_TX_DONE) {
cec.tx_done = 1;
- CECDBG("CEC: m_TX_DONE,busfree=%d\n", cec.tx_done);
+ HDMIDBG(1, "CEC: m_TX_DONE,busfree=%d\n", cec.tx_done);
} else {
cec.tx_done = -1;
- CECDBG("CEC: else:busfree=%d\n", cec.tx_done);
+ HDMIDBG(1, "CEC: else:busfree=%d\n", cec.tx_done);
}
wake_up_interruptible_all(&cec.wait);
hdmi_writel(hdmi_dev, CEC_TX_INT, 0xFF);
hdmi_writel(hdmi_dev, CEC_RX_INT, 0xFF);
- CECDBG(KERN_ERR "CEC: rockchip_hdmiv1_cec_init success\n");
+ HDMIDBG(1, "CEC: rockchip_hdmiv1_cec_init sucess\n");
rockchip_hdmi_cec_init(hdmi,
rockchip_hdmiv1_cec_send_frame,
rockchip_hdmiv1_cec_read_frame,
init = 0;
init_waitqueue_head(&cec.wait);
}
- CECDBG("%s", __func__);
+ HDMIDBG(1, "%s", __func__);
}
{
int i = 0;
- DBG("HDCP: check hdcp key\n");
+ HDMIDBG(3, "HDCP: check hdcp key\n");
/*check 40 private key */
for (i = 0; i < HDCP_PRIVATE_KEY_SIZE; i++) {
if (key->devicekey[i] != 0x00)
return -1;
hdmi_dev = hdcp->hdmi_dev;
key = hdcp->keys;
- DBG("HDCP: rockchip_hdmiv1_hdcp_load_key2mem start\n");
+ HDMIDBG(3, "HDCP: rockchip_hdmiv1_hdcp_load_key2mem start\n");
/* Write 40 private key*/
for (i = 0; i < HDCP_PRIVATE_KEY_SIZE; i++)
hdmi_writel(hdmi_dev, HDCP_KEY_FIFO, key->devicekey[i]);
/* Write 2nd aksv*/
for (i = 0; i < 5; i++)
hdmi_writel(hdmi_dev, HDCP_KEY_FIFO, key->ksv[i]);
- DBG("HDCP: rockchip_hdmiv1_hdcp_load_key2mem end\n");
+ HDMIDBG(3, "HDCP: rockchip_hdmiv1_hdcp_load_key2mem end\n");
return HDCP_OK;
}
{
struct hdcp_delayed_work *work;
- DBG("%s event %04x delay %d\n", __func__, event, delay);
+ HDMIDBG(3, "%s event %04x delay %d\n", __func__, event, delay);
work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (work) {
hdcp->hdcp_state = HDCP_AUTHENTICATION_START;
if (hdcp->auth_state == 1 && timer_state == 0) {
- DBG("add auth timer\n");
+ HDMIDBG(3, "add auth timer\n");
hdcp->auth_state = 0;
hdcp->retry_cnt = HDCP_INFINITE_REAUTH;
auth_timer.expires = jiffies + AUTH_TIMEOUT;
hdcp->hdcp_state = HDCP_ENABLE_PENDING;
if (timer_state == 1) {
- DBG("delete auth timer\n");
+ HDMIDBG(3, "delete auth timer\n");
del_timer_sync(&auth_timer);
timer_state = 0;
}
int status = HDCP_OK;
hdcp->hdcp_state = HDCP_AUTHENTICATION_START;
- DBG("HDCP: authentication start\n");
+ HDMIDBG(3, "HDCP: authentication start\n");
status = rockchip_hdmiv1_hdcp_start_authentication(hdcp->hdmi_dev);
if (status != HDCP_OK) {
- DBG("HDCP: authentication failed\n");
+ HDMIDBG(3, "HDCP: authentication failed\n");
hdcp_wq_authentication_failure();
} else {
/*hdcp->hdcp_state = HDCP_WAIT_KSV_LIST;*/
{
hdcp->auth_state = 1;
if (timer_state == 1) {
- DBG("delete auth timer\n");
+ HDMIDBG(3, "delete auth timer\n");
timer_state = 0;
del_timer_sync(&auth_timer);
}
int event = hdcp_w->event;
mutex_lock(&hdcp->lock);
- DBG("hdcp_work_queue() - START - %u hdmi=%d hdcp=%d evt= %x %d\n",
- jiffies_to_msecs(jiffies),
- hdcp->hdmi_state,
- hdcp->hdcp_state,
- (event & 0xFF00) >> 8,
- event & 0xFF);
+ HDMIDBG(3, "%s - START - %u hdmi=%d hdcp=%d evt= %x %d\n",
+ __func__,
+ jiffies_to_msecs(jiffies),
+ hdcp->hdmi_state,
+ hdcp->hdcp_state,
+ (event & 0xFF00) >> 8,
+ event & 0xFF);
if (event == HDCP_STOP_FRAME_EVENT)
hdcp->hdmi_state = HDMI_STOPPED;
*/
static void hdcp_start_frame_cb(struct hdmi *hdmi)
{
- DBG("hdcp_start_frame_cb()\n");
+ HDMIDBG(3, "hdcp_start_frame_cb()\n");
/* Cancel any pending work */
if (hdcp->pending_start)
hdcp_cancel_work(&hdcp->pending_wq_event);
if (timer_state == 0) {
- DBG("add auth timer\n");
+ HDMIDBG(3, "add auth timer\n");
auth_timer.expires = jiffies + AUTH_TIMEOUT;
add_timer(&auth_timer);
timer_state = 1;
rockchip_hdmiv1_hdcp_interrupt(hdcp->hdmi_dev,
&interrupt1,
&interrupt2);
- DBG("%s 0x%02x 0x%02x\n", __func__, interrupt1, interrupt2);
+ HDMIDBG(3, "%s 0x%02x 0x%02x\n", __func__, interrupt1, interrupt2);
if (interrupt1 & m_INT_HDCP_ERR) {
if ((hdcp->hdcp_state != HDCP_DISABLED) &&
(hdcp->hdcp_state != HDCP_ENABLE_PENDING))
*/
static int hdcp_power_on_cb(void)
{
- DBG("%s", __func__);
+ HDMIDBG(3, "%s", __func__);
return rockchip_hdmiv1_hdcp_load_key2mem();
}
{
unsigned int time;
- DBG("%s\n", __func__);
+ HDMIDBG(3, "%s\n", __func__);
if (timer_state == 1) {
- DBG("delete auth timer\n");
+ HDMIDBG(3, "delete auth timer\n");
timer_state = 0;
del_timer_sync(&auth_timer);
}
HDCP_WARN("HDCP: load hdcp key success\n");
if (fw->size > HDCP_KEY_SIZE) {
- DBG("%s invalid key size %d\n", __func__,
- (int)fw->size - HDCP_KEY_SIZE);
+ HDMIDBG(3, "%s invalid key size %d\n", __func__,
+ (int)fw->size - HDCP_KEY_SIZE);
if ((fw->size - HDCP_KEY_SIZE) % 5) {
pr_err("HDCP: failed to load invalid keys\n");
return;
{
int ret;
- DBG("[%s]\n", __func__);
+ HDMIDBG(3, "[%s]\n", __func__);
if (hdcp)
return 0;
init_timer(&auth_timer);
auth_timer.data = 0;
auth_timer.function = auth_timer_func;
- DBG("%s success\n", __func__);
+ HDMIDBG(3, "%s success\n", __func__);
return 0;
error5:
destroy_workqueue(hdcp->workqueue);
char info[SIZE_VSI_INFOFRAME];
int i;
- DBG("[%s] vic_3d %d format %d.\n", __func__, vic_3d, format);
+ HDMIDBG(2, "[%s] vic_3d %d format %d.\n", __func__, vic_3d, format);
memset(info, 0, SIZE_VSI_INFOFRAME);
hdmi_msk_reg(hdmi_dev, PACKET_SEND_AUTO,
m_PACKET_VSI_EN, v_PACKET_VSI_EN(0));
struct hdmi *hdmi = hdmi_dev->hdmi;
struct pinctrl_state *gpio_state;
- HDMIDBG("hdmi enter early suspend\n");
+ HDMIDBG(2, "hdmi enter early suspend\n");
hdmi_submit_work(hdmi, HDMI_SUSPEND_CTL, 0, 1);
/* iomux to gpio and pull down when suspend */
gpio_state = pinctrl_lookup_state(hdmi_dev->dev->pins->p, "gpio");
{
struct hdmi *hdmi = hdmi_dev->hdmi;
- HDMIDBG("hdmi exit early resume\n");
+ HDMIDBG(2, "hdmi exit early resume\n");
/* iomux to default state for hdmi use when resume */
pinctrl_select_state(hdmi_dev->dev->pins->p,
hdmi_dev->dev->pins->default_state);
case FB_BLANK_UNBLANK:
break;
default:
- HDMIDBG("suspend hdmi\n");
+ HDMIDBG(2, "suspend hdmi\n");
if (!hdmi->sleep) {
hdmi_submit_work(hdmi,
HDMI_SUSPEND_CTL,
} else if (action == FB_EVENT_BLANK) {
switch (*((int *)event->data)) {
case FB_BLANK_UNBLANK:
- HDMIDBG("resume hdmi\n");
+ HDMIDBG(2, "resume hdmi\n");
if (hdmi->sleep) {
#ifdef CONFIG_PINCTRL
pinctrl_select_state(pins->p,
int ret = -1;
struct resource *res;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
hdmi_dev = kmalloc(sizeof(*hdmi_dev), GFP_KERNEL);
if (!hdmi_dev) {
dev_err(&pdev->dev, ">>rockchip hdmiv2 kmalloc fail!");
#endif
#include "../rockchip-hdmi.h"
-#ifdef DEBUG
-#define HDMIDBG(format, ...) \
- pr_info(format, ## __VA_ARGS__)
-#else
-#define HDMIDBG(format, ...)
-#endif
-
#define HDMI_PD_ON BIT(0)
#define HDMI_PCLK_ON BIT(1)
#define HDMI_HDCPCLK_ON BIT(2)
static int init = 1;
void rockchip_hdmiv2_cec_isr(struct hdmi_dev *hdmi_dev, char cec_int)
{
- CECDBG("%s cec 0x%x\n", __func__, cec_int);
+ HDMIDBG(1, "%s cec 0x%x\n", __func__, cec_int);
if (cec_int & m_EOM)
rockchip_hdmi_cec_submit_work(EVENT_RX_FRAME, 0, NULL);
if (cec_int & m_DONE)
- CECDBG("send frame success\n");
+ HDMIDBG(1, "send frame success\n");
}
static int rockchip_hdmiv2_cec_readframe(struct hdmi *hdmi,
if (((hdmi_dev->clk_on & HDMI_PCLK_ON) == 0) || !frame)
return -1;
count = hdmi_readl(hdmi_dev, CEC_RX_CNT);
- CECDBG("%s count %d\n", __func__, count);
+ HDMIDBG(1, "%s count %d\n", __func__, count);
for (i = 0; i < count; i++) {
data[i] = hdmi_readl(hdmi_dev, CEC_RX_DATA0 + i);
- CECDBG("%02x\n", data[i]);
+ HDMIDBG(1, "%02x\n", data[i]);
}
frame->argcount = count - 2;
hdmi_writel(hdmi_dev, CEC_LOCK, 0x0);
if ((hdmi_dev->clk_on & HDMI_PCLK_ON) == 0)
return CEC_SEND_NACK;
- CECDBG("TX srcdestaddr %02x opcode %02x ",
- frame->srcdestaddr, frame->opcode);
+ HDMIDBG(1, "TX srcdestaddr %02x opcode %02x ",
+ frame->srcdestaddr, frame->opcode);
if (frame->argcount) {
- CECDBG("args:");
+ HDMIDBG(1, "args:");
for (i = 0; i < frame->argcount; i++)
- CECDBG("%02x ", frame->args[i]);
+ HDMIDBG(1, "%02x ", frame->args[i]);
}
- CECDBG("\n");
+ HDMIDBG(1, "\n");
if ((frame->srcdestaddr & 0x0f) == ((frame->srcdestaddr >> 4) & 0x0f)) {
/*it is a ping command*/
hdmi_writel(hdmi_dev, CEC_TX_DATA0, frame->srcdestaddr);
break;
}
}
- CECDBG("%s interrupt 0x%02x\n", __func__, interrupt);
+ HDMIDBG(1, "%s interrupt 0x%02x\n", __func__, interrupt);
if (interrupt & m_DONE)
return CEC_SEND_SUCCESS;
else if (interrupt & m_NACK)
hdmi_writel(hdmi_dev, IH_MUTE_CEC_STAT0, m_ERR_INITIATOR |
m_ARB_LOST | m_NACK | m_DONE);
- CECDBG("%s", __func__);
+ HDMIDBG(1, "%s", __func__);
}
static int rockchip_hdmiv2_scrambling_enable(struct hdmi_dev *hdmi_dev,
int enable)
{
- HDMIDBG("%s enable %d\n", __func__, enable);
+ HDMIDBG(2, "%s enable %d\n", __func__, enable);
if (enable == 1) {
/* Write on Rx the bit Scrambling_Enable, register 0x20 */
rockchip_hdmiv2_i2cm_write_data(hdmi_dev, 1, SCDC_TMDS_CONFIG);
if (pixclock == 0)
return NULL;
- HDMIDBG("%s pixClock %u tmdsclk %u colorDepth %d\n",
+ HDMIDBG(2, "%s pixClock %u tmdsclk %u colorDepth %d\n",
__func__, pixclock, tmdsclk, colordepth);
for (i = 0; i < ARRAY_SIZE(EXT_PLL_TABLE); i++) {
if ((EXT_PLL_TABLE[i].pix_clock == pixclock) &&
if (pixclock == 0)
return NULL;
- HDMIDBG("%s pixClock %u tmdsclk %u pixRepet %d colorDepth %d\n",
+ HDMIDBG(2, "%s pixClock %u tmdsclk %u pixRepet %d colorDepth %d\n",
__func__, pixclock, tmdsclk, pixrepet, colordepth);
for (i = 0; i < ARRAY_SIZE(PHY_MPLL_TABLE); i++) {
if ((PHY_MPLL_TABLE[i].pix_clock == pixclock) &&
u32 value;
value = hdmi_readl(hdmi_dev, PHY_STAT0);
- HDMIDBG("[%s] reg%x value %02x\n", __func__, PHY_STAT0, value);
+ HDMIDBG(2, "[%s] reg%x value %02x\n", __func__, PHY_STAT0, value);
if (value & m_PHY_HPD)
return HDMI_HPD_ACTIVED;
int offset = (block % 2) * 0x80;
int interrupt = 0;
- HDMIDBG("[%s] block %d\n", __func__, block);
+ HDMIDBG(2, "[%s] block %d\n", __func__, block);
rockchip_hdmiv2_i2cm_reset(hdmi_dev);
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("[%s] vic %d format %d.\n", __func__, vic_3d, format);
+ HDMIDBG(2, "[%s] vic %d format %d.\n", __func__, vic_3d, format);
hdmi_msk_reg(hdmi_dev, FC_DATAUTO0, m_VSD_AUTO, v_VSD_AUTO(0));
hdmi_writel(hdmi_dev, FC_VSDIEEEID2, id & 0xff);
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("%s vic %d 3dformat %d color mode %d color depth %d\n",
+ HDMIDBG(2, "%s vic %d 3dformat %d color mode %d color depth %d\n",
__func__, vpara->vic, vpara->format_3d,
vpara->color_output, vpara->color_output_depth);
int rate = 0;
char design_id;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (audio->channel < 3)
channel = I2S_CHANNEL_1_2;
word_length = I2S_16BIT_SAMPLE;
}
- HDMIDBG("rate = %d, tmdsclk = %u, N = %d, CTS = %d\n",
+ HDMIDBG(2, "rate = %d, tmdsclk = %u, N = %d, CTS = %d\n",
audio->rate, hdmi_dev->tmdsclk, N, CTS);
/* more than 2 channels => layout 1 else layout 0 */
hdmi_msk_reg(hdmi_dev, FC_AUDSCONF,
*/
if (audio->type == HDMI_AUDIO_NLPCM) {
if (channel == I2S_CHANNEL_7_8) {
- HDMIDBG("hbr mode.\n");
+ HDMIDBG(2, "hbr mode.\n");
hdmi_writel(hdmi_dev, AUD_CONF2, 0x1);
word_length = I2S_24BIT_SAMPLE;
} else if ((audio->rate == HDMI_AUDIO_FS_32000) ||
(audio->rate == HDMI_AUDIO_FS_48000) ||
(audio->rate == HDMI_AUDIO_FS_176400) ||
(audio->rate == HDMI_AUDIO_FS_192000)) {
- HDMIDBG("nlpcm mode.\n");
+ HDMIDBG(2, "nlpcm mode.\n");
hdmi_writel(hdmi_dev, AUD_CONF2, 0x2);
word_length = I2S_24BIT_SAMPLE;
} else {
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
struct hdmi_video vpara;
- HDMIDBG("[%s] %d\n", __func__, enable);
+ HDMIDBG(2, "[%s] %d\n", __func__, enable);
if (enable == HDMI_AV_UNMUTE) {
hdmi_writel(hdmi_dev, FC_DBGFORCE, 0x00);
if (hdmi->edid.sink_hdmi == OUTPUT_HDMI)
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (!hdmi->uboot)
hdmi_writel(hdmi_dev, MC_CLKDIS, m_HDCPCLK_DISABLE);
return HDMI_ERROR_SUCCESS;
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (hdmi->ops->hdcp_power_off_cb)
hdmi->ops->hdcp_power_off_cb(hdmi);
rockchip_hdmiv2_powerdown(hdmi_dev);
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (!hdmi_dev->enable) {
hdmi_writel(hdmi_dev, IH_MUTE, 0x00);
hdmi_dev->enable = 1;
{
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
- HDMIDBG("%s\n", __func__);
+ HDMIDBG(2, "%s\n", __func__);
if (hdmi_dev->enable) {
hdmi_dev->enable = 0;
hdmi_writel(hdmi_dev, IH_MUTE, 0x1);