Skip to content

Commit

Permalink
hdmitx: fix dead code and bad sizeof
Browse files Browse the repository at this point in the history
PD#150078: driver defect clean up:
torvalds#14
torvalds#89
torvalds#111
torvalds#124
torvalds#133
torvalds#136
torvalds#137
torvalds#146
torvalds#148
torvalds#150
torvalds#153

Change-Id: I734a66a8b92a0dc57a232879463a3fc074534fa0
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
  • Loading branch information
Zongdong Jiao authored and akiernan committed Nov 3, 2022
1 parent e7b989c commit cb2a091
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,32 +198,12 @@ void Edid_DecodeStandardTiming(struct hdmitx_info *info,

frame_rate = (int)((Data[i*2 + 1]) & 0x3F) + 60;

if ((hor_pixel == 720) && (frame_rate == 30))
info->hdmi_sup_480i = 1;
else if ((hor_pixel == 720) && (frame_rate == 25))
info->hdmi_sup_576i = 1;
else if ((hor_pixel == 720) && (frame_rate == 60))
if ((hor_pixel == 720) && (frame_rate == 60))
info->hdmi_sup_480p = 1;
else if ((hor_pixel == 720) && (frame_rate == 50))
info->hdmi_sup_576p = 1;
else if ((hor_pixel == 1280) && (frame_rate == 60))
info->hdmi_sup_720p_60hz = 1;
else if ((hor_pixel == 1280) && (frame_rate == 50))
info->hdmi_sup_720p_50hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 30))
info->hdmi_sup_1080i_60hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 25))
info->hdmi_sup_1080i_50hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 60))
info->hdmi_sup_1080p_60hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 50))
info->hdmi_sup_1080p_50hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 24))
info->hdmi_sup_1080p_24hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 25))
info->hdmi_sup_1080p_25hz = 1;
else if ((hor_pixel == 1920) && (frame_rate == 30))
info->hdmi_sup_1080p_30hz = 1;
}
}
}
Expand Down Expand Up @@ -2350,7 +2330,7 @@ static void hdmitx_edid_blk_print(unsigned char *blk, unsigned int blk_idx)
if (!tmp_buf)
return;

memset(tmp_buf, 0, sizeof(TMP_EDID_BUF_SIZE));
memset(tmp_buf, 0, TMP_EDID_BUF_SIZE);
hdmi_print(INF, EDID "blk%d raw data\n", blk_idx);
for (i = 0, pos = 0; i < 128; i++) {
pos += sprintf(tmp_buf + pos, "%02x", blk[i]);
Expand Down

0 comments on commit cb2a091

Please sign in to comment.