Skip to content

Commit 54c33a4

Browse files
jernejskwens
authored andcommitted
drm/sun4i: Nuke mixer pointer from layer code
It's not used anymore, so remove it. This allows trully independent layer state from mixer. 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-31-jernej.skrabec@gmail.com Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
1 parent 345bca7 commit 54c33a4

6 files changed

Lines changed: 5 additions & 14 deletions

File tree

drivers/gpu/drm/sun4i/sun8i_mixer.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static void sun8i_mixer_commit(struct sunxi_engine *engine,
269269
int w, h, x, y, zpos;
270270
bool enable;
271271

272-
if (!(plane->possible_crtcs & drm_crtc_mask(crtc)) || layer->mixer != mixer)
272+
if (!(plane->possible_crtcs & drm_crtc_mask(crtc)))
273273
continue;
274274

275275
plane_state = drm_atomic_get_new_plane_state(state, plane);
@@ -337,9 +337,8 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
337337
if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
338338
phy_index = mixer->cfg->map[i];
339339

340-
layer = sun8i_vi_layer_init_one(drm, mixer, type,
341-
mixer->engine.regs, i,
342-
phy_index, plane_cnt,
340+
layer = sun8i_vi_layer_init_one(drm, type, mixer->engine.regs,
341+
i, phy_index, plane_cnt,
343342
&mixer->cfg->lay_cfg);
344343
if (IS_ERR(layer)) {
345344
dev_err(drm->dev,
@@ -363,9 +362,8 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
363362
if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
364363
phy_index = mixer->cfg->map[index];
365364

366-
layer = sun8i_ui_layer_init_one(drm, mixer, type,
367-
mixer->engine.regs, index,
368-
phy_index, plane_cnt,
365+
layer = sun8i_ui_layer_init_one(drm, type, mixer->engine.regs,
366+
index, phy_index, plane_cnt,
369367
&mixer->cfg->lay_cfg);
370368
if (IS_ERR(layer)) {
371369
dev_err(drm->dev, "Couldn't initialize %s plane\n",

drivers/gpu/drm/sun4i/sun8i_mixer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ enum {
226226

227227
struct sun8i_layer {
228228
struct drm_plane plane;
229-
struct sun8i_mixer *mixer;
230229
int type;
231230
int index;
232231
int channel;

drivers/gpu/drm/sun4i/sun8i_ui_layer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ static const uint64_t sun8i_layer_modifiers[] = {
258258
};
259259

260260
struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
261-
struct sun8i_mixer *mixer,
262261
enum drm_plane_type type,
263262
struct regmap *regs,
264263
int index, int phy_index,
@@ -272,7 +271,6 @@ struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
272271
if (!layer)
273272
return ERR_PTR(-ENOMEM);
274273

275-
layer->mixer = mixer;
276274
layer->type = SUN8I_LAYER_TYPE_UI;
277275
layer->index = index;
278276
layer->channel = phy_index;

drivers/gpu/drm/sun4i/sun8i_ui_layer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct sun8i_mixer;
5050
struct sun8i_layer;
5151

5252
struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
53-
struct sun8i_mixer *mixer,
5453
enum drm_plane_type type,
5554
struct regmap *regs,
5655
int index, int phy_index,

drivers/gpu/drm/sun4i/sun8i_vi_layer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ static const uint64_t sun8i_layer_modifiers[] = {
409409
};
410410

411411
struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm,
412-
struct sun8i_mixer *mixer,
413412
enum drm_plane_type type,
414413
struct regmap *regs,
415414
int index, int phy_index,
@@ -426,7 +425,6 @@ struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm,
426425
if (!layer)
427426
return ERR_PTR(-ENOMEM);
428427

429-
layer->mixer = mixer;
430428
layer->type = SUN8I_LAYER_TYPE_VI;
431429
layer->index = index;
432430
layer->channel = phy_index;

drivers/gpu/drm/sun4i/sun8i_vi_layer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ struct sun8i_mixer;
5555
struct sun8i_layer;
5656

5757
struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm,
58-
struct sun8i_mixer *mixer,
5958
enum drm_plane_type type,
6059
struct regmap *regs,
6160
int index, int phy_index,

0 commit comments

Comments
 (0)