mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
hdmitx: add feature limited [3/3]
PD#174490 Problem: Lack feature limited for certain types Solution: Add feature limited for certain types Verify: TBD Change-Id: Ifbe104fe98fe1e3875f2f1af7793348856275b92 Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
2cea229e67
commit
3846a45dc3
@@ -47,6 +47,7 @@
|
||||
#include <linux/extcon.h>
|
||||
#include <linux/i2c.h>
|
||||
|
||||
#include <linux/amlogic/cpu_version.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
#include <linux/amlogic/media/vout/vout_notify.h>
|
||||
#ifdef CONFIG_AMLOGIC_SND_SOC
|
||||
@@ -2170,7 +2171,7 @@ static int is_4k50_fmt(char *mode)
|
||||
"2160p50hz",
|
||||
"2160p60hz",
|
||||
"smpte50hz",
|
||||
"smpte50hz",
|
||||
"smpte60hz",
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -2181,6 +2182,33 @@ static int is_4k50_fmt(char *mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_4k_fmt(char *mode)
|
||||
{
|
||||
int i;
|
||||
static char const *hdmi4k[] = {
|
||||
"2160p",
|
||||
"smpte",
|
||||
NULL
|
||||
};
|
||||
|
||||
for (i = 0; hdmi4k[i]; i++) {
|
||||
if (strstr(mode, hdmi4k[i]))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* below items has feature limited, may need extra judgement */
|
||||
static bool hdmitx_limited_1080p(void)
|
||||
{
|
||||
if (is_meson_gxl_package_805X())
|
||||
return 1;
|
||||
else if (is_meson_gxl_package_805Y())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**/
|
||||
static ssize_t show_disp_cap(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -2197,6 +2225,8 @@ static ssize_t show_disp_cap(struct device *dev,
|
||||
for (i = 0; disp_mode_t[i]; i++) {
|
||||
memset(mode_tmp, 0, sizeof(mode_tmp));
|
||||
strncpy(mode_tmp, disp_mode_t[i], 31);
|
||||
if (hdmitx_limited_1080p() && is_4k_fmt(mode_tmp))
|
||||
continue;
|
||||
vic = hdmitx_edid_get_VIC(&hdmitx_device, mode_tmp, 0);
|
||||
/* Handling only 4k420 mode */
|
||||
if (vic == HDMI_Unknown) {
|
||||
|
||||
Reference in New Issue
Block a user