diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_kms.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_plane.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_plane.h | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index b5f66b78cbb2..15f8d145a133 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c | |||
@@ -195,13 +195,13 @@ void rcar_du_crtc_route_output(struct drm_crtc *crtc, | |||
195 | 195 | ||
196 | static unsigned int plane_zpos(struct rcar_du_plane *plane) | 196 | static unsigned int plane_zpos(struct rcar_du_plane *plane) |
197 | { | 197 | { |
198 | return to_rcar_du_plane_state(plane->plane.state)->zpos; | 198 | return to_rcar_plane_state(plane->plane.state)->zpos; |
199 | } | 199 | } |
200 | 200 | ||
201 | static const struct rcar_du_format_info * | 201 | static const struct rcar_du_format_info * |
202 | plane_format(struct rcar_du_plane *plane) | 202 | plane_format(struct rcar_du_plane *plane) |
203 | { | 203 | { |
204 | return to_rcar_du_plane_state(plane->plane.state)->format; | 204 | return to_rcar_plane_state(plane->plane.state)->format; |
205 | } | 205 | } |
206 | 206 | ||
207 | static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc) | 207 | static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc) |
@@ -234,7 +234,7 @@ static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc) | |||
234 | for (i = 0; i < num_planes; ++i) { | 234 | for (i = 0; i < num_planes; ++i) { |
235 | struct rcar_du_plane *plane = planes[i]; | 235 | struct rcar_du_plane *plane = planes[i]; |
236 | struct drm_plane_state *state = plane->plane.state; | 236 | struct drm_plane_state *state = plane->plane.state; |
237 | unsigned int index = to_rcar_du_plane_state(state)->hwindex; | 237 | unsigned int index = to_rcar_plane_state(state)->hwindex; |
238 | 238 | ||
239 | prio -= 4; | 239 | prio -= 4; |
240 | dspr |= (index + 1) << prio; | 240 | dspr |= (index + 1) << prio; |
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index 4012afacab5f..14d457047c40 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c | |||
@@ -221,7 +221,7 @@ static bool rcar_du_plane_needs_realloc(struct rcar_du_plane *plane, | |||
221 | { | 221 | { |
222 | const struct rcar_du_format_info *cur_format; | 222 | const struct rcar_du_format_info *cur_format; |
223 | 223 | ||
224 | cur_format = to_rcar_du_plane_state(plane->plane.state)->format; | 224 | cur_format = to_rcar_plane_state(plane->plane.state)->format; |
225 | 225 | ||
226 | /* Lowering the number of planes doesn't strictly require reallocation | 226 | /* Lowering the number of planes doesn't strictly require reallocation |
227 | * as the extra hardware plane will be freed when committing, but doing | 227 | * as the extra hardware plane will be freed when committing, but doing |
@@ -284,7 +284,7 @@ static int rcar_du_atomic_check(struct drm_device *dev, | |||
284 | continue; | 284 | continue; |
285 | 285 | ||
286 | plane = to_rcar_plane(state->planes[i]); | 286 | plane = to_rcar_plane(state->planes[i]); |
287 | plane_state = to_rcar_du_plane_state(state->plane_states[i]); | 287 | plane_state = to_rcar_plane_state(state->plane_states[i]); |
288 | 288 | ||
289 | /* If the plane is being disabled we don't need to go through | 289 | /* If the plane is being disabled we don't need to go through |
290 | * the full reallocation procedure. Just mark the hardware | 290 | * the full reallocation procedure. Just mark the hardware |
@@ -345,7 +345,7 @@ static int rcar_du_atomic_check(struct drm_device *dev, | |||
345 | if (group_freed_planes[index] & (1 << i)) | 345 | if (group_freed_planes[index] & (1 << i)) |
346 | continue; | 346 | continue; |
347 | 347 | ||
348 | plane_state = to_rcar_du_plane_state(plane->plane.state); | 348 | plane_state = to_rcar_plane_state(plane->plane.state); |
349 | used_planes |= rcar_du_plane_hwmask(plane_state); | 349 | used_planes |= rcar_du_plane_hwmask(plane_state); |
350 | } | 350 | } |
351 | 351 | ||
@@ -363,7 +363,7 @@ static int rcar_du_atomic_check(struct drm_device *dev, | |||
363 | continue; | 363 | continue; |
364 | 364 | ||
365 | plane = to_rcar_plane(state->planes[i]); | 365 | plane = to_rcar_plane(state->planes[i]); |
366 | plane_state = to_rcar_du_plane_state(state->plane_states[i]); | 366 | plane_state = to_rcar_plane_state(state->plane_states[i]); |
367 | 367 | ||
368 | /* Skip planes that are being disabled or don't need to be | 368 | /* Skip planes that are being disabled or don't need to be |
369 | * reallocated. | 369 | * reallocated. |
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index 99fefcaf6597..d3ed528fa56d 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c | |||
@@ -45,7 +45,7 @@ static void rcar_du_plane_write(struct rcar_du_group *rgrp, | |||
45 | static void rcar_du_plane_setup_fb(struct rcar_du_plane *plane) | 45 | static void rcar_du_plane_setup_fb(struct rcar_du_plane *plane) |
46 | { | 46 | { |
47 | struct rcar_du_plane_state *state = | 47 | struct rcar_du_plane_state *state = |
48 | to_rcar_du_plane_state(plane->plane.state); | 48 | to_rcar_plane_state(plane->plane.state); |
49 | struct drm_framebuffer *fb = plane->plane.state->fb; | 49 | struct drm_framebuffer *fb = plane->plane.state->fb; |
50 | struct rcar_du_group *rgrp = plane->group; | 50 | struct rcar_du_group *rgrp = plane->group; |
51 | unsigned int src_x = state->state.src_x >> 16; | 51 | unsigned int src_x = state->state.src_x >> 16; |
@@ -109,7 +109,7 @@ static void rcar_du_plane_setup_mode(struct rcar_du_plane *plane, | |||
109 | unsigned int index) | 109 | unsigned int index) |
110 | { | 110 | { |
111 | struct rcar_du_plane_state *state = | 111 | struct rcar_du_plane_state *state = |
112 | to_rcar_du_plane_state(plane->plane.state); | 112 | to_rcar_plane_state(plane->plane.state); |
113 | struct rcar_du_group *rgrp = plane->group; | 113 | struct rcar_du_group *rgrp = plane->group; |
114 | u32 colorkey; | 114 | u32 colorkey; |
115 | u32 pnmr; | 115 | u32 pnmr; |
@@ -172,7 +172,7 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane, | |||
172 | unsigned int index) | 172 | unsigned int index) |
173 | { | 173 | { |
174 | struct rcar_du_plane_state *state = | 174 | struct rcar_du_plane_state *state = |
175 | to_rcar_du_plane_state(plane->plane.state); | 175 | to_rcar_plane_state(plane->plane.state); |
176 | struct rcar_du_group *rgrp = plane->group; | 176 | struct rcar_du_group *rgrp = plane->group; |
177 | u32 ddcr2 = PnDDCR2_CODE; | 177 | u32 ddcr2 = PnDDCR2_CODE; |
178 | u32 ddcr4; | 178 | u32 ddcr4; |
@@ -222,7 +222,7 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane, | |||
222 | void rcar_du_plane_setup(struct rcar_du_plane *plane) | 222 | void rcar_du_plane_setup(struct rcar_du_plane *plane) |
223 | { | 223 | { |
224 | struct rcar_du_plane_state *state = | 224 | struct rcar_du_plane_state *state = |
225 | to_rcar_du_plane_state(plane->plane.state); | 225 | to_rcar_plane_state(plane->plane.state); |
226 | 226 | ||
227 | __rcar_du_plane_setup(plane, state->hwindex); | 227 | __rcar_du_plane_setup(plane, state->hwindex); |
228 | if (state->format->planes == 2) | 228 | if (state->format->planes == 2) |
@@ -234,7 +234,7 @@ void rcar_du_plane_setup(struct rcar_du_plane *plane) | |||
234 | static int rcar_du_plane_atomic_check(struct drm_plane *plane, | 234 | static int rcar_du_plane_atomic_check(struct drm_plane *plane, |
235 | struct drm_plane_state *state) | 235 | struct drm_plane_state *state) |
236 | { | 236 | { |
237 | struct rcar_du_plane_state *rstate = to_rcar_du_plane_state(state); | 237 | struct rcar_du_plane_state *rstate = to_rcar_plane_state(state); |
238 | struct rcar_du_plane *rplane = to_rcar_plane(plane); | 238 | struct rcar_du_plane *rplane = to_rcar_plane(plane); |
239 | struct rcar_du_device *rcdu = rplane->group->dev; | 239 | struct rcar_du_device *rcdu = rplane->group->dev; |
240 | 240 | ||
@@ -302,7 +302,7 @@ rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane) | |||
302 | struct rcar_du_plane_state *state; | 302 | struct rcar_du_plane_state *state; |
303 | struct rcar_du_plane_state *copy; | 303 | struct rcar_du_plane_state *copy; |
304 | 304 | ||
305 | state = to_rcar_du_plane_state(plane->state); | 305 | state = to_rcar_plane_state(plane->state); |
306 | copy = kmemdup(state, sizeof(*state), GFP_KERNEL); | 306 | copy = kmemdup(state, sizeof(*state), GFP_KERNEL); |
307 | if (copy == NULL) | 307 | if (copy == NULL) |
308 | return NULL; | 308 | return NULL; |
@@ -319,7 +319,7 @@ static void rcar_du_plane_atomic_destroy_state(struct drm_plane *plane, | |||
319 | if (state->fb) | 319 | if (state->fb) |
320 | drm_framebuffer_unreference(state->fb); | 320 | drm_framebuffer_unreference(state->fb); |
321 | 321 | ||
322 | kfree(to_rcar_du_plane_state(state)); | 322 | kfree(to_rcar_plane_state(state)); |
323 | } | 323 | } |
324 | 324 | ||
325 | static int rcar_du_plane_atomic_set_property(struct drm_plane *plane, | 325 | static int rcar_du_plane_atomic_set_property(struct drm_plane *plane, |
@@ -327,7 +327,7 @@ static int rcar_du_plane_atomic_set_property(struct drm_plane *plane, | |||
327 | struct drm_property *property, | 327 | struct drm_property *property, |
328 | uint64_t val) | 328 | uint64_t val) |
329 | { | 329 | { |
330 | struct rcar_du_plane_state *rstate = to_rcar_du_plane_state(state); | 330 | struct rcar_du_plane_state *rstate = to_rcar_plane_state(state); |
331 | struct rcar_du_device *rcdu = to_rcar_plane(plane)->group->dev; | 331 | struct rcar_du_device *rcdu = to_rcar_plane(plane)->group->dev; |
332 | 332 | ||
333 | if (property == rcdu->props.alpha) | 333 | if (property == rcdu->props.alpha) |
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.h b/drivers/gpu/drm/rcar-du/rcar_du_plane.h index d1fb9b16a060..9732bff1911b 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.h | |||
@@ -59,7 +59,7 @@ struct rcar_du_plane_state { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | static inline struct rcar_du_plane_state * | 61 | static inline struct rcar_du_plane_state * |
62 | to_rcar_du_plane_state(struct drm_plane_state *state) | 62 | to_rcar_plane_state(struct drm_plane_state *state) |
63 | { | 63 | { |
64 | return container_of(state, struct rcar_du_plane_state, state); | 64 | return container_of(state, struct rcar_du_plane_state, state); |
65 | } | 65 | } |