Commit 296674b9 authored by Mateusz Kwiatkowski's avatar Mateusz Kwiatkowski Committed by Maxime Ripard

drm/vc4: vec: Remove redundant atomic_mode_set

Let's remove the superfluous tv_mode field, which was redundant with the
mode field in struct drm_tv_connector_state.
Signed-off-by: default avatarMateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Reviewed-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728-rpi-analog-tv-properties-v2-27-459522d653a7@cerno.tech
parent 38baec94
...@@ -171,8 +171,6 @@ struct vc4_vec { ...@@ -171,8 +171,6 @@ struct vc4_vec {
struct clk *clock; struct clk *clock;
const struct vc4_vec_tv_mode *tv_mode;
struct debugfs_regset32 regset; struct debugfs_regset32 regset;
}; };
...@@ -316,7 +314,6 @@ static int vc4_vec_connector_init(struct drm_device *dev, struct vc4_vec *vec) ...@@ -316,7 +314,6 @@ static int vc4_vec_connector_init(struct drm_device *dev, struct vc4_vec *vec)
drm_object_attach_property(&connector->base, drm_object_attach_property(&connector->base,
dev->mode_config.tv_mode_property, dev->mode_config.tv_mode_property,
VC4_VEC_TV_MODE_NTSC); VC4_VEC_TV_MODE_NTSC);
vec->tv_mode = &vc4_vec_tv_modes[VC4_VEC_TV_MODE_NTSC];
drm_connector_attach_encoder(connector, &vec->encoder.base); drm_connector_attach_encoder(connector, &vec->encoder.base);
...@@ -360,8 +357,11 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder, ...@@ -360,8 +357,11 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder,
{ {
struct drm_device *drm = encoder->dev; struct drm_device *drm = encoder->dev;
struct vc4_vec *vec = encoder_to_vc4_vec(encoder); struct vc4_vec *vec = encoder_to_vc4_vec(encoder);
struct drm_connector *connector = &vec->connector;
struct drm_connector_state *conn_state =
drm_atomic_get_new_connector_state(state, connector);
const struct vc4_vec_tv_mode *tv_mode = const struct vc4_vec_tv_mode *tv_mode =
vec->tv_mode; &vc4_vec_tv_modes[conn_state->tv.mode];
int idx, ret; int idx, ret;
if (!drm_dev_enter(drm, &idx)) if (!drm_dev_enter(drm, &idx))
...@@ -443,15 +443,6 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder, ...@@ -443,15 +443,6 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder,
drm_dev_exit(idx); drm_dev_exit(idx);
} }
static void vc4_vec_encoder_atomic_mode_set(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
struct vc4_vec *vec = encoder_to_vc4_vec(encoder);
vec->tv_mode = &vc4_vec_tv_modes[conn_state->tv.mode];
}
static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder, static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state, struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state) struct drm_connector_state *conn_state)
...@@ -471,7 +462,6 @@ static const struct drm_encoder_helper_funcs vc4_vec_encoder_helper_funcs = { ...@@ -471,7 +462,6 @@ static const struct drm_encoder_helper_funcs vc4_vec_encoder_helper_funcs = {
.atomic_check = vc4_vec_encoder_atomic_check, .atomic_check = vc4_vec_encoder_atomic_check,
.atomic_disable = vc4_vec_encoder_disable, .atomic_disable = vc4_vec_encoder_disable,
.atomic_enable = vc4_vec_encoder_enable, .atomic_enable = vc4_vec_encoder_enable,
.atomic_mode_set = vc4_vec_encoder_atomic_mode_set,
}; };
static int vc4_vec_late_register(struct drm_encoder *encoder) static int vc4_vec_late_register(struct drm_encoder *encoder)
......
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