mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
ODROID-COMMON: hdmitx: Enable forced RGB colorspace
Change-Id: I05cff725af3a75fba0dee7703adf8e02d380fd99
This commit is contained in:
@@ -550,7 +550,8 @@ static int set_disp_mode_auto(void)
|
||||
else {
|
||||
/* nothing */
|
||||
}
|
||||
if ((vic_ready != HDMI_Unknown) && (vic_ready == vic)) {
|
||||
if ((vic_ready != HDMI_Unknown) && (vic_ready == vic)
|
||||
&& (!hdmi_output_rgb)) {
|
||||
pr_info(SYS "[%s] ALREADY init VIC = %d\n",
|
||||
__func__, vic);
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
@@ -5377,7 +5378,11 @@ static int __init hdmitx_boot_para_setup(char *s)
|
||||
hdmitx_device.cec_func_config = list;
|
||||
pr_info("HDMI hdmi_cec_func_config:0x%x\n",
|
||||
hdmitx_device.cec_func_config);
|
||||
} else if (strcmp(token, "forcergb") == 0) {
|
||||
hdmitx_output_rgb();
|
||||
pr_info("HDMI Forced RGB colorspace output\n");
|
||||
}
|
||||
|
||||
check_hdmiuboot_attr(token);
|
||||
}
|
||||
offset = token_offset;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/amlogic/media/vout/hdmi_tx/hdmi_tx_compliance.h>
|
||||
#include "hw/common.h"
|
||||
|
||||
unsigned char hdmi_output_rgb = 0;
|
||||
static void hdmitx_set_spd_info(struct hdmitx_dev *hdmitx_device);
|
||||
static void hdmi_set_vend_spec_infofram(struct hdmitx_dev *hdev,
|
||||
enum hdmi_vic VideoCode);
|
||||
@@ -939,6 +940,11 @@ static int is_dvi_device(struct rx_cap *prxcap)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void hdmitx_output_rgb(void)
|
||||
{
|
||||
hdmi_output_rgb = 1;
|
||||
}
|
||||
|
||||
int hdmitx_set_display(struct hdmitx_dev *hdev, enum hdmi_vic VideoCode)
|
||||
{
|
||||
struct hdmitx_vidpara *param = NULL;
|
||||
@@ -963,20 +969,26 @@ int hdmitx_set_display(struct hdmitx_dev *hdev, enum hdmi_vic VideoCode)
|
||||
hdev->cur_video_param = param;
|
||||
if (param) {
|
||||
param->color = param->color_prefer;
|
||||
/* HDMI CT 7-24 Pixel Encoding
|
||||
* YCbCr to YCbCr Sink
|
||||
*/
|
||||
switch (hdev->rxcap.native_Mode & 0x30) {
|
||||
case 0x20:/*bit5==1, then support YCBCR444 + RGB*/
|
||||
case 0x30:
|
||||
param->color = COLORSPACE_YUV444;
|
||||
break;
|
||||
case 0x10:/*bit4==1, then support YCBCR422 + RGB*/
|
||||
param->color = COLORSPACE_YUV422;
|
||||
break;
|
||||
default:
|
||||
if (hdmi_output_rgb) {
|
||||
param->color = COLORSPACE_RGB444;
|
||||
} else {
|
||||
/* HDMI CT 7-24 Pixel Encoding
|
||||
* YCbCr to YCbCr Sink
|
||||
*/
|
||||
switch (hdev->rxcap.native_Mode & 0x30) {
|
||||
case 0x20:/*bit5==1, then support YCBCR444 + RGB*/
|
||||
case 0x30:
|
||||
param->color = COLORSPACE_YUV444;
|
||||
break;
|
||||
case 0x10:/*bit4==1, then support YCBCR422 + RGB*/
|
||||
param->color = COLORSPACE_YUV422;
|
||||
break;
|
||||
default:
|
||||
param->color = COLORSPACE_RGB444;
|
||||
}
|
||||
}
|
||||
pr_info("[%s] output_rgb %d, cs %d\n", __func__,
|
||||
hdmi_output_rgb, param->color);
|
||||
/* For Y420 modes */
|
||||
switch (VideoCode) {
|
||||
case HDMI_3840x2160p50_16x9_Y420:
|
||||
|
||||
@@ -775,6 +775,9 @@ extern void phy_pll_off(void);
|
||||
extern int get_hpd_state(void);
|
||||
extern void hdmitx_hdcp_do_work(struct hdmitx_dev *hdev);
|
||||
|
||||
extern void hdmitx_output_rgb(void);
|
||||
extern unsigned char hdmi_output_rgb;
|
||||
|
||||
/***********************************************************************
|
||||
* hdmitx hardware level interface
|
||||
***********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user