mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ps3av: treat DVI-D like HDMI in autodetect
treat DVI-D monitors like HDMI monitors when autodetecting the best video mode Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
71a27fecaf
commit
101aa56d02
2 changed files with 8 additions and 17 deletions
|
@ -620,9 +620,6 @@ static int ps3av_hdmi_get_id(struct ps3av_info_monitor *info)
|
||||||
u32 res_50, res_60;
|
u32 res_50, res_60;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
if (info->monitor_type != PS3AV_MONITOR_TYPE_HDMI)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* check native resolution */
|
/* check native resolution */
|
||||||
res_50 = info->res_50.native & PS3AV_RES_MASK_50;
|
res_50 = info->res_50.native & PS3AV_RES_MASK_50;
|
||||||
res_60 = info->res_60.native & PS3AV_RES_MASK_60;
|
res_60 = info->res_60.native & PS3AV_RES_MASK_60;
|
||||||
|
@ -712,7 +709,7 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf,
|
||||||
struct ps3av_info_monitor *info;
|
struct ps3av_info_monitor *info;
|
||||||
|
|
||||||
/* get mode id for hdmi */
|
/* get mode id for hdmi */
|
||||||
for (i = 0; i < av_hw_conf->num_of_hdmi; i++) {
|
for (i = 0; i < av_hw_conf->num_of_hdmi && !id; i++) {
|
||||||
res = ps3av_cmd_video_get_monitor_info(&monitor_info,
|
res = ps3av_cmd_video_get_monitor_info(&monitor_info,
|
||||||
PS3AV_CMD_AVPORT_HDMI_0 +
|
PS3AV_CMD_AVPORT_HDMI_0 +
|
||||||
i);
|
i);
|
||||||
|
@ -720,24 +717,19 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf,
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
ps3av_monitor_info_dump(&monitor_info);
|
ps3av_monitor_info_dump(&monitor_info);
|
||||||
|
|
||||||
info = &monitor_info.info;
|
info = &monitor_info.info;
|
||||||
/* check DVI */
|
switch (info->monitor_type) {
|
||||||
if (info->monitor_type == PS3AV_MONITOR_TYPE_DVI) {
|
case PS3AV_MONITOR_TYPE_DVI:
|
||||||
dvi = PS3AV_MODE_DVI;
|
dvi = PS3AV_MODE_DVI;
|
||||||
break;
|
/* fall through */
|
||||||
}
|
case PS3AV_MONITOR_TYPE_HDMI:
|
||||||
/* check HDMI */
|
id = ps3av_hdmi_get_id(info);
|
||||||
id = ps3av_hdmi_get_id(info);
|
|
||||||
if (id) {
|
|
||||||
/* got valid mode id */
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dvi) {
|
if (!id) {
|
||||||
/* DVI mode */
|
|
||||||
id = PS3AV_DEFAULT_DVI_MODE_ID;
|
|
||||||
} else if (!id) {
|
|
||||||
/* no HDMI interface or HDMI is off */
|
/* no HDMI interface or HDMI is off */
|
||||||
if (ps3av->region & PS3AV_REGION_60)
|
if (ps3av->region & PS3AV_REGION_60)
|
||||||
id = PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60;
|
id = PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60;
|
||||||
|
|
|
@ -305,7 +305,6 @@
|
||||||
#define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60 1 /* 480i */
|
#define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60 1 /* 480i */
|
||||||
#define PS3AV_DEFAULT_HDMI_MODE_ID_REG_50 7 /* 576p */
|
#define PS3AV_DEFAULT_HDMI_MODE_ID_REG_50 7 /* 576p */
|
||||||
#define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_50 6 /* 576i */
|
#define PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_50 6 /* 576i */
|
||||||
#define PS3AV_DEFAULT_DVI_MODE_ID 2 /* 480p */
|
|
||||||
|
|
||||||
#define PS3AV_REGION_60 0x01
|
#define PS3AV_REGION_60 0x01
|
||||||
#define PS3AV_REGION_50 0x02
|
#define PS3AV_REGION_50 0x02
|
||||||
|
|
Loading…
Reference in a new issue