Skip to content

Commit 0bc7d54

Browse files
jernejskwens
authored andcommitted
drm/sun4i: csc: use layer arg instead of mixer
Layer will be more universal, due to DE33 support. Reviewed-by: Chen-Yu Tsai <wens@kernel.org> Tested-by: Ryan Walklin <ryan@testtoast.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20251104180942.61538-22-jernej.skrabec@gmail.com Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
1 parent 37aba59 commit 0bc7d54

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/gpu/drm/sun4i/sun8i_csc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,22 +227,22 @@ static u32 sun8i_csc_get_mode(struct drm_plane_state *state)
227227
}
228228
}
229229

230-
void sun8i_csc_config(struct sun8i_mixer *mixer, int layer,
230+
void sun8i_csc_config(struct sun8i_layer *layer,
231231
struct drm_plane_state *state)
232232
{
233233
u32 mode = sun8i_csc_get_mode(state);
234234
u32 base;
235235

236-
if (mixer->cfg->de_type == SUN8I_MIXER_DE3) {
237-
sun8i_de3_ccsc_setup(mixer->engine.regs, layer,
236+
if (layer->mixer->cfg->de_type == SUN8I_MIXER_DE3) {
237+
sun8i_de3_ccsc_setup(layer->regs, layer->channel,
238238
mode, state->color_encoding,
239239
state->color_range);
240240
return;
241241
}
242242

243-
base = ccsc_base[mixer->cfg->ccsc][layer];
243+
base = ccsc_base[layer->mixer->cfg->ccsc][layer->channel];
244244

245-
sun8i_csc_setup(mixer->engine.regs, base,
245+
sun8i_csc_setup(layer->regs, base,
246246
mode, state->color_encoding,
247247
state->color_range);
248248
}

drivers/gpu/drm/sun4i/sun8i_csc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <drm/drm_color_mgmt.h>
1010

1111
struct drm_plane_state;
12-
struct sun8i_mixer;
12+
struct sun8i_layer;
1313

1414
/* VI channel CSC units offsets */
1515
#define CCSC00_OFFSET 0xAA050
@@ -23,7 +23,7 @@ struct sun8i_mixer;
2323

2424
#define SUN8I_CSC_CTRL_EN BIT(0)
2525

26-
void sun8i_csc_config(struct sun8i_mixer *mixer, int layer,
26+
void sun8i_csc_config(struct sun8i_layer *layer,
2727
struct drm_plane_state *state);
2828

2929
#endif

drivers/gpu/drm/sun4i/sun8i_vi_layer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void sun8i_vi_layer_atomic_update(struct drm_plane *plane,
301301

302302
sun8i_vi_layer_update_attributes(layer, plane);
303303
sun8i_vi_layer_update_coord(layer, plane);
304-
sun8i_csc_config(layer->mixer, layer->channel, new_state);
304+
sun8i_csc_config(layer, new_state);
305305
sun8i_vi_layer_update_buffer(layer, plane);
306306
}
307307

0 commit comments

Comments
 (0)