Commit d7ba3d71 authored by Maxime Ripard's avatar Maxime Ripard Committed by Heiko Stuebner

drm/rockchip: inno_hdmi: no need to store vic

The mode's VIC is only ever used in the inno_hdmi_setup() function so
there's no need to store it in the main structure.
Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
Tested-by: default avatarAlex Bee <knaerzche@gmail.com>
[made checkpatch happy]
Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222174220.55249-9-knaerzche@gmail.com
parent d3e040f4
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "inno_hdmi.h" #include "inno_hdmi.h"
struct hdmi_data_info { struct hdmi_data_info {
int vic;
bool sink_has_audio; bool sink_has_audio;
unsigned int enc_in_format; unsigned int enc_in_format;
unsigned int enc_out_format; unsigned int enc_out_format;
...@@ -442,16 +441,15 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi, ...@@ -442,16 +441,15 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct drm_display_info *display = &hdmi->connector.display_info; struct drm_display_info *display = &hdmi->connector.display_info;
u8 vic = drm_match_cea_mode(mode);
hdmi->hdmi_data.vic = drm_match_cea_mode(mode);
hdmi->hdmi_data.enc_in_format = HDMI_COLORSPACE_RGB; hdmi->hdmi_data.enc_in_format = HDMI_COLORSPACE_RGB;
hdmi->hdmi_data.enc_out_format = HDMI_COLORSPACE_RGB; hdmi->hdmi_data.enc_out_format = HDMI_COLORSPACE_RGB;
if ((hdmi->hdmi_data.vic == 6) || (hdmi->hdmi_data.vic == 7) || if (vic == 6 || vic == 7 ||
(hdmi->hdmi_data.vic == 21) || (hdmi->hdmi_data.vic == 22) || vic == 21 || vic == 22 ||
(hdmi->hdmi_data.vic == 2) || (hdmi->hdmi_data.vic == 3) || vic == 2 || vic == 3 ||
(hdmi->hdmi_data.vic == 17) || (hdmi->hdmi_data.vic == 18)) vic == 17 || vic == 18)
hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_601; hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_601;
else else
hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_709; hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_709;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment