Skip to content

Commit 1bcba22

Browse files
committed
drm/i915: s/state/plane_state/
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ä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
1 parent 9ba1922 commit 1bcba22

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

drivers/gpu/drm/i915/display/intel_fb.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,13 +1049,13 @@ static u32 intel_adjust_aligned_offset(int *x, int *y,
10491049
* the x/y offsets.
10501050
*/
10511051
u32 intel_plane_adjust_aligned_offset(int *x, int *y,
1052-
const struct intel_plane_state *state,
1052+
const struct intel_plane_state *plane_state,
10531053
int color_plane,
10541054
u32 old_offset, u32 new_offset)
10551055
{
1056-
return intel_adjust_aligned_offset(x, y, state->hw.fb, color_plane,
1057-
state->hw.rotation,
1058-
state->view.color_plane[color_plane].mapping_stride,
1056+
return intel_adjust_aligned_offset(x, y, plane_state->hw.fb, color_plane,
1057+
plane_state->hw.rotation,
1058+
plane_state->view.color_plane[color_plane].mapping_stride,
10591059
old_offset, new_offset);
10601060
}
10611061

@@ -1129,14 +1129,14 @@ static u32 intel_compute_aligned_offset(struct intel_display *display,
11291129
}
11301130

11311131
u32 intel_plane_compute_aligned_offset(int *x, int *y,
1132-
const struct intel_plane_state *state,
1132+
const struct intel_plane_state *plane_state,
11331133
int color_plane)
11341134
{
1135-
struct intel_display *display = to_intel_display(state);
1136-
struct intel_plane *plane = to_intel_plane(state->uapi.plane);
1137-
const struct drm_framebuffer *fb = state->hw.fb;
1138-
unsigned int rotation = state->hw.rotation;
1139-
unsigned int pitch = state->view.color_plane[color_plane].mapping_stride;
1135+
struct intel_display *display = to_intel_display(plane_state);
1136+
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
1137+
const struct drm_framebuffer *fb = plane_state->hw.fb;
1138+
unsigned int rotation = plane_state->hw.rotation;
1139+
unsigned int pitch = plane_state->view.color_plane[color_plane].mapping_stride;
11401140
unsigned int alignment = plane->min_alignment(plane, fb, color_plane);
11411141

11421142
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
19451945
* with gen2/3, and 90/270 degree rotations isn't supported on any of them.
19461946
*/
19471947
u32 intel_fb_xy_to_linear(int x, int y,
1948-
const struct intel_plane_state *state,
1948+
const struct intel_plane_state *plane_state,
19491949
int color_plane)
19501950
{
1951-
const struct drm_framebuffer *fb = state->hw.fb;
1951+
const struct drm_framebuffer *fb = plane_state->hw.fb;
19521952
unsigned int cpp = fb->format->cpp[color_plane];
1953-
unsigned int pitch = state->view.color_plane[color_plane].mapping_stride;
1953+
unsigned int pitch = plane_state->view.color_plane[color_plane].mapping_stride;
19541954

19551955
return y * pitch + x * cpp;
19561956
}
@@ -1961,12 +1961,12 @@ u32 intel_fb_xy_to_linear(int x, int y,
19611961
* specify the start of scanout from the beginning of the gtt mapping.
19621962
*/
19631963
void intel_add_fb_offsets(int *x, int *y,
1964-
const struct intel_plane_state *state,
1964+
const struct intel_plane_state *plane_state,
19651965
int color_plane)
19661966

19671967
{
1968-
*x += state->view.color_plane[color_plane].x;
1969-
*y += state->view.color_plane[color_plane].y;
1968+
*x += plane_state->view.color_plane[color_plane].x;
1969+
*y += plane_state->view.color_plane[color_plane].y;
19701970
}
19711971

19721972
static

drivers/gpu/drm/i915/display/intel_fb.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ void intel_fb_plane_get_subsampling(int *hsub, int *vsub,
7171
int color_plane);
7272

7373
u32 intel_plane_adjust_aligned_offset(int *x, int *y,
74-
const struct intel_plane_state *state,
74+
const struct intel_plane_state *plane_state,
7575
int color_plane,
7676
u32 old_offset, u32 new_offset);
7777
u32 intel_plane_compute_aligned_offset(int *x, int *y,
78-
const struct intel_plane_state *state,
78+
const struct intel_plane_state *plane_state,
7979
int color_plane);
8080

8181
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,
9494
int intel_plane_compute_gtt(struct intel_plane_state *plane_state);
9595

9696
unsigned int intel_fb_xy_to_linear(int x, int y,
97-
const struct intel_plane_state *state,
98-
int plane);
97+
const struct intel_plane_state *plane_state,
98+
int color_plane);
9999
void intel_add_fb_offsets(int *x, int *y,
100-
const struct intel_plane_state *state, int plane);
100+
const struct intel_plane_state *plane_state,
101+
int color_plane);
101102

102103
int intel_framebuffer_init(struct intel_framebuffer *ifb,
103104
struct drm_gem_object *obj,

0 commit comments

Comments
 (0)