]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: s/state/plane_state/
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Feb 2025 15:02:20 +0000 (17:02 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Sat, 15 Feb 2025 19:04:06 +0000 (21:04 +0200)
Use the canonical 'plane_state' name for function arguments
where appropriate.

Also do the s/int plane/int color_plane/ in couple of the
function prototypes while at it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213150220.13580-13-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/display/intel_fb.h

index b62dbb879fc295bfd9aa8c4d97729e9106956ac3..2b0e0f220442f1d30d50b1bdb33a4b00e2eaccc8 100644 (file)
@@ -1049,13 +1049,13 @@ static u32 intel_adjust_aligned_offset(int *x, int *y,
  * the x/y offsets.
  */
 u32 intel_plane_adjust_aligned_offset(int *x, int *y,
-                                     const struct intel_plane_state *state,
+                                     const struct intel_plane_state *plane_state,
                                      int color_plane,
                                      u32 old_offset, u32 new_offset)
 {
-       return intel_adjust_aligned_offset(x, y, state->hw.fb, color_plane,
-                                          state->hw.rotation,
-                                          state->view.color_plane[color_plane].mapping_stride,
+       return intel_adjust_aligned_offset(x, y, plane_state->hw.fb, color_plane,
+                                          plane_state->hw.rotation,
+                                          plane_state->view.color_plane[color_plane].mapping_stride,
                                           old_offset, new_offset);
 }
 
@@ -1129,14 +1129,14 @@ static u32 intel_compute_aligned_offset(struct intel_display *display,
 }
 
 u32 intel_plane_compute_aligned_offset(int *x, int *y,
-                                      const struct intel_plane_state *state,
+                                      const struct intel_plane_state *plane_state,
                                       int color_plane)
 {
-       struct intel_display *display = to_intel_display(state);
-       struct intel_plane *plane = to_intel_plane(state->uapi.plane);
-       const struct drm_framebuffer *fb = state->hw.fb;
-       unsigned int rotation = state->hw.rotation;
-       unsigned int pitch = state->view.color_plane[color_plane].mapping_stride;
+       struct intel_display *display = to_intel_display(plane_state);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
+       unsigned int pitch = plane_state->view.color_plane[color_plane].mapping_stride;
        unsigned int alignment = plane->min_alignment(plane, fb, color_plane);
 
        return intel_compute_aligned_offset(display, x, y, fb, color_plane,
@@ -1945,12 +1945,12 @@ void intel_fb_fill_view(const struct intel_framebuffer *fb, unsigned int rotatio
  * with gen2/3, and 90/270 degree rotations isn't supported on any of them.
  */
 u32 intel_fb_xy_to_linear(int x, int y,
-                         const struct intel_plane_state *state,
+                         const struct intel_plane_state *plane_state,
                          int color_plane)
 {
-       const struct drm_framebuffer *fb = state->hw.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int cpp = fb->format->cpp[color_plane];
-       unsigned int pitch = state->view.color_plane[color_plane].mapping_stride;
+       unsigned int pitch = plane_state->view.color_plane[color_plane].mapping_stride;
 
        return y * pitch + x * cpp;
 }
@@ -1961,12 +1961,12 @@ u32 intel_fb_xy_to_linear(int x, int y,
  * specify the start of scanout from the beginning of the gtt mapping.
  */
 void intel_add_fb_offsets(int *x, int *y,
-                         const struct intel_plane_state *state,
+                         const struct intel_plane_state *plane_state,
                          int color_plane)
 
 {
-       *x += state->view.color_plane[color_plane].x;
-       *y += state->view.color_plane[color_plane].y;
+       *x += plane_state->view.color_plane[color_plane].x;
+       *y += plane_state->view.color_plane[color_plane].y;
 }
 
 static
index 46286a40e10efc50f2ec57787873c7e9f105918d..bdd76b3729578a5c1f92f593e6745e09250eb3e4 100644 (file)
@@ -71,11 +71,11 @@ void intel_fb_plane_get_subsampling(int *hsub, int *vsub,
                                    int color_plane);
 
 u32 intel_plane_adjust_aligned_offset(int *x, int *y,
-                                     const struct intel_plane_state *state,
+                                     const struct intel_plane_state *plane_state,
                                      int color_plane,
                                      u32 old_offset, u32 new_offset);
 u32 intel_plane_compute_aligned_offset(int *x, int *y,
-                                      const struct intel_plane_state *state,
+                                      const struct intel_plane_state *plane_state,
                                       int color_plane);
 
 bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb);
@@ -94,10 +94,11 @@ unsigned int intel_fb_view_vtd_guard(const struct drm_framebuffer *fb,
 int intel_plane_compute_gtt(struct intel_plane_state *plane_state);
 
 unsigned int intel_fb_xy_to_linear(int x, int y,
-                                  const struct intel_plane_state *state,
-                                  int plane);
+                                  const struct intel_plane_state *plane_state,
+                                  int color_plane);
 void intel_add_fb_offsets(int *x, int *y,
-                         const struct intel_plane_state *state, int plane);
+                         const struct intel_plane_state *plane_state,
+                         int color_plane);
 
 int intel_framebuffer_init(struct intel_framebuffer *ifb,
                           struct drm_gem_object *obj,