Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jernej Skrabec and committed by
Chen-Yu Tsai
54c33a4f 345bca73

+5 -14
+5 -7
drivers/gpu/drm/sun4i/sun8i_mixer.c
··· 269 269 int w, h, x, y, zpos; 270 270 bool enable; 271 271 272 - if (!(plane->possible_crtcs & drm_crtc_mask(crtc)) || layer->mixer != mixer) 272 + if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) 273 273 continue; 274 274 275 275 plane_state = drm_atomic_get_new_plane_state(state, plane); ··· 337 337 if (mixer->cfg->de_type == SUN8I_MIXER_DE33) 338 338 phy_index = mixer->cfg->map[i]; 339 339 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, 343 342 &mixer->cfg->lay_cfg); 344 343 if (IS_ERR(layer)) { 345 344 dev_err(drm->dev, ··· 362 363 if (mixer->cfg->de_type == SUN8I_MIXER_DE33) 363 364 phy_index = mixer->cfg->map[index]; 364 365 365 - layer = sun8i_ui_layer_init_one(drm, mixer, type, 366 - mixer->engine.regs, index, 367 - phy_index, plane_cnt, 366 + layer = sun8i_ui_layer_init_one(drm, type, mixer->engine.regs, 367 + index, phy_index, plane_cnt, 368 368 &mixer->cfg->lay_cfg); 369 369 if (IS_ERR(layer)) { 370 370 dev_err(drm->dev, "Couldn't initialize %s plane\n",
-1
drivers/gpu/drm/sun4i/sun8i_mixer.h
··· 226 226 227 227 struct sun8i_layer { 228 228 struct drm_plane plane; 229 - struct sun8i_mixer *mixer; 230 229 int type; 231 230 int index; 232 231 int channel;
-2
drivers/gpu/drm/sun4i/sun8i_ui_layer.c
··· 258 258 }; 259 259 260 260 struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm, 261 - struct sun8i_mixer *mixer, 262 261 enum drm_plane_type type, 263 262 struct regmap *regs, 264 263 int index, int phy_index, ··· 271 272 if (!layer) 272 273 return ERR_PTR(-ENOMEM); 273 274 274 - layer->mixer = mixer; 275 275 layer->type = SUN8I_LAYER_TYPE_UI; 276 276 layer->index = index; 277 277 layer->channel = phy_index;
-1
drivers/gpu/drm/sun4i/sun8i_ui_layer.h
··· 50 50 struct sun8i_layer; 51 51 52 52 struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm, 53 - struct sun8i_mixer *mixer, 54 53 enum drm_plane_type type, 55 54 struct regmap *regs, 56 55 int index, int phy_index,
-2
drivers/gpu/drm/sun4i/sun8i_vi_layer.c
··· 409 409 }; 410 410 411 411 struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm, 412 - struct sun8i_mixer *mixer, 413 412 enum drm_plane_type type, 414 413 struct regmap *regs, 415 414 int index, int phy_index, ··· 425 426 if (!layer) 426 427 return ERR_PTR(-ENOMEM); 427 428 428 - layer->mixer = mixer; 429 429 layer->type = SUN8I_LAYER_TYPE_VI; 430 430 layer->index = index; 431 431 layer->channel = phy_index;
-1
drivers/gpu/drm/sun4i/sun8i_vi_layer.h
··· 55 55 struct sun8i_layer; 56 56 57 57 struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm, 58 - struct sun8i_mixer *mixer, 59 58 enum drm_plane_type type, 60 59 struct regmap *regs, 61 60 int index, int phy_index,