Skip to content

Commit b1558c7

Browse files
committed
drm/i915: Nuke crtc->plane
Eliminate crtc->plane since it's pretty much a layering violation. We can always get the plane via crtc->primary if we actually need it. The only ugly thing left is plane_to_crtc_mapping[], but that's still needed by the pre-g4x watermark code. v2: Removed a misplaced comment change (Daniel) v3: Rebase due to fbc crtc->y usage removal v4: s/plane/i9xx_plane/ etc. (James) Cc: James Ausmus <james.ausmus@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-9-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
1 parent dd57602 commit b1558c7

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13463,14 +13463,13 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
1346313463
goto fail;
1346413464

1346513465
intel_crtc->pipe = pipe;
13466-
intel_crtc->i9xx_plane = primary->i9xx_plane;
1346713466

1346813467
/* initialize shared scalers */
1346913468
intel_crtc_init_scalers(intel_crtc, crtc_state);
1347013469

1347113470
BUG_ON(pipe >= ARRAY_SIZE(dev_priv->plane_to_crtc_mapping) ||
13472-
dev_priv->plane_to_crtc_mapping[intel_crtc->i9xx_plane] != NULL);
13473-
dev_priv->plane_to_crtc_mapping[intel_crtc->i9xx_plane] = intel_crtc;
13471+
dev_priv->plane_to_crtc_mapping[primary->i9xx_plane] != NULL);
13472+
dev_priv->plane_to_crtc_mapping[primary->i9xx_plane] = intel_crtc;
1347413473
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = intel_crtc;
1347513474

1347613475
drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);

drivers/gpu/drm/i915/intel_drv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ struct intel_crtc_state {
799799
struct intel_crtc {
800800
struct drm_crtc base;
801801
enum pipe pipe;
802-
enum i9xx_plane_id i9xx_plane;
803802
/*
804803
* Whether the crtc and the connected output pipeline is active. Implies
805804
* that crtc->enabled is set, i.e. the current mode configuration has

drivers/gpu/drm/i915/intel_fbc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ static void intel_fbc_get_reg_params(struct intel_crtc *crtc,
890890
params->vma = cache->vma;
891891

892892
params->crtc.pipe = crtc->pipe;
893-
params->crtc.i9xx_plane = crtc->i9xx_plane;
893+
params->crtc.i9xx_plane = to_intel_plane(crtc->base.primary)->i9xx_plane;
894894
params->crtc.fence_y_offset = get_crtc_fence_y_offset(fbc);
895895

896896
params->fb.format = cache->fb.format;
@@ -1086,7 +1086,7 @@ void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
10861086
if (fbc_on_pipe_a_only(dev_priv) && crtc->pipe != PIPE_A)
10871087
continue;
10881088

1089-
if (fbc_on_plane_a_only(dev_priv) && crtc->i9xx_plane != PLANE_A)
1089+
if (fbc_on_plane_a_only(dev_priv) && plane->i9xx_plane != PLANE_A)
10901090
continue;
10911091

10921092
crtc_state = intel_atomic_get_new_crtc_state(state, crtc);

0 commit comments

Comments
 (0)