]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: Don't pass plane to .check_plane()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 Aug 2018 14:27:06 +0000 (17:27 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 Aug 2018 19:13:25 +0000 (22:13 +0300)
.check_plane() already gets the plane state, so we can dig out the plane
from there if needed. No need in passing it separately.

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180828142707.31583-1-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/i915/intel_atomic_plane.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c

index dcba645cabb87db8fbd7a0eb85e710e1b48691c5..eddcdd6e4b3bf418b1bc9295d62b5053996a3d4d 100644 (file)
@@ -159,7 +159,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
        }
 
        intel_state->base.visible = false;
-       ret = intel_plane->check_plane(intel_plane, crtc_state, intel_state);
+       ret = intel_plane->check_plane(crtc_state, intel_state);
        if (ret)
                return ret;
 
index b0b6e1e9a2943f63279527426c8ca371ad07432f..2afe1bdb284edc9e1c9110ea01c2e36b1873033c 100644 (file)
@@ -9694,8 +9694,7 @@ static bool i845_cursor_size_ok(const struct intel_plane_state *plane_state)
        return intel_cursor_size_ok(plane_state) && IS_ALIGNED(width, 64);
 }
 
-static int i845_check_cursor(struct intel_plane *plane,
-                            struct intel_crtc_state *crtc_state,
+static int i845_check_cursor(struct intel_crtc_state *crtc_state,
                             struct intel_plane_state *plane_state)
 {
        const struct drm_framebuffer *fb = plane_state->base.fb;
@@ -9885,10 +9884,10 @@ static bool i9xx_cursor_size_ok(const struct intel_plane_state *plane_state)
        return true;
 }
 
-static int i9xx_check_cursor(struct intel_plane *plane,
-                            struct intel_crtc_state *crtc_state,
+static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
                             struct intel_plane_state *plane_state)
 {
+       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        const struct drm_framebuffer *fb = plane_state->base.fb;
        enum pipe pipe = plane->pipe;
@@ -13190,10 +13189,10 @@ skl_max_scale(struct intel_crtc *intel_crtc,
 }
 
 static int
-intel_check_primary_plane(struct intel_plane *plane,
-                         struct intel_crtc_state *crtc_state,
+intel_check_primary_plane(struct intel_crtc_state *crtc_state,
                          struct intel_plane_state *state)
 {
+       struct intel_plane *plane = to_intel_plane(state->base.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        struct drm_crtc *crtc = state->base.crtc;
        int min_scale = DRM_PLANE_HELPER_NO_SCALING;
index 94bd2735eb62cdd847c1edaca8a713eb75c962ca..9d0ca1715d8197e402f6fb01b67e1b9ae29450f1 100644 (file)
@@ -971,9 +971,8 @@ struct intel_plane {
        void (*disable_plane)(struct intel_plane *plane,
                              struct intel_crtc *crtc);
        bool (*get_hw_state)(struct intel_plane *plane, enum pipe *pipe);
-       int (*check_plane)(struct intel_plane *plane,
-                          struct intel_crtc_state *crtc_state,
-                          struct intel_plane_state *state);
+       int (*check_plane)(struct intel_crtc_state *crtc_state,
+                          struct intel_plane_state *plane_state);
 };
 
 struct intel_watermark_params {
index c286dda625e476a0005b170e9d1489caa6f39acf..9600ccfc5b7699ff54b1d74be02afbff7e9cb46f 100644 (file)
@@ -959,10 +959,10 @@ g4x_plane_get_hw_state(struct intel_plane *plane,
 }
 
 static int
-intel_check_sprite_plane(struct intel_plane *plane,
-                        struct intel_crtc_state *crtc_state,
+intel_check_sprite_plane(struct intel_crtc_state *crtc_state,
                         struct intel_plane_state *state)
 {
+       struct intel_plane *plane = to_intel_plane(state->base.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
        struct drm_framebuffer *fb = state->base.fb;