drm: rcar-du: Rename to_rcar_du_plane_state to to_rcar_plane_state
All other cast functions are named without using "du", make the plane state cast consistent with them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
This commit is contained in:
parent
99caede11d
commit
ec69a40645
|
@ -195,13 +195,13 @@ void rcar_du_crtc_route_output(struct drm_crtc *crtc,
|
||||||
|
|
||||||
static unsigned int plane_zpos(struct rcar_du_plane *plane)
|
static unsigned int plane_zpos(struct rcar_du_plane *plane)
|
||||||
{
|
{
|
||||||
return to_rcar_du_plane_state(plane->plane.state)->zpos;
|
return to_rcar_plane_state(plane->plane.state)->zpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct rcar_du_format_info *
|
static const struct rcar_du_format_info *
|
||||||
plane_format(struct rcar_du_plane *plane)
|
plane_format(struct rcar_du_plane *plane)
|
||||||
{
|
{
|
||||||
return to_rcar_du_plane_state(plane->plane.state)->format;
|
return to_rcar_plane_state(plane->plane.state)->format;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc)
|
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)
|
||||||
for (i = 0; i < num_planes; ++i) {
|
for (i = 0; i < num_planes; ++i) {
|
||||||
struct rcar_du_plane *plane = planes[i];
|
struct rcar_du_plane *plane = planes[i];
|
||||||
struct drm_plane_state *state = plane->plane.state;
|
struct drm_plane_state *state = plane->plane.state;
|
||||||
unsigned int index = to_rcar_du_plane_state(state)->hwindex;
|
unsigned int index = to_rcar_plane_state(state)->hwindex;
|
||||||
|
|
||||||
prio -= 4;
|
prio -= 4;
|
||||||
dspr |= (index + 1) << prio;
|
dspr |= (index + 1) << prio;
|
||||||
|
|
|
@ -221,7 +221,7 @@ static bool rcar_du_plane_needs_realloc(struct rcar_du_plane *plane,
|
||||||
{
|
{
|
||||||
const struct rcar_du_format_info *cur_format;
|
const struct rcar_du_format_info *cur_format;
|
||||||
|
|
||||||
cur_format = to_rcar_du_plane_state(plane->plane.state)->format;
|
cur_format = to_rcar_plane_state(plane->plane.state)->format;
|
||||||
|
|
||||||
/* Lowering the number of planes doesn't strictly require reallocation
|
/* Lowering the number of planes doesn't strictly require reallocation
|
||||||
* as the extra hardware plane will be freed when committing, but doing
|
* 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,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
plane = to_rcar_plane(state->planes[i]);
|
plane = to_rcar_plane(state->planes[i]);
|
||||||
plane_state = to_rcar_du_plane_state(state->plane_states[i]);
|
plane_state = to_rcar_plane_state(state->plane_states[i]);
|
||||||
|
|
||||||
/* If the plane is being disabled we don't need to go through
|
/* If the plane is being disabled we don't need to go through
|
||||||
* the full reallocation procedure. Just mark the hardware
|
* the full reallocation procedure. Just mark the hardware
|
||||||
|
@ -345,7 +345,7 @@ static int rcar_du_atomic_check(struct drm_device *dev,
|
||||||
if (group_freed_planes[index] & (1 << i))
|
if (group_freed_planes[index] & (1 << i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
plane_state = to_rcar_du_plane_state(plane->plane.state);
|
plane_state = to_rcar_plane_state(plane->plane.state);
|
||||||
used_planes |= rcar_du_plane_hwmask(plane_state);
|
used_planes |= rcar_du_plane_hwmask(plane_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ static int rcar_du_atomic_check(struct drm_device *dev,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
plane = to_rcar_plane(state->planes[i]);
|
plane = to_rcar_plane(state->planes[i]);
|
||||||
plane_state = to_rcar_du_plane_state(state->plane_states[i]);
|
plane_state = to_rcar_plane_state(state->plane_states[i]);
|
||||||
|
|
||||||
/* Skip planes that are being disabled or don't need to be
|
/* Skip planes that are being disabled or don't need to be
|
||||||
* reallocated.
|
* reallocated.
|
||||||
|
|
|
@ -45,7 +45,7 @@ static void rcar_du_plane_write(struct rcar_du_group *rgrp,
|
||||||
static void rcar_du_plane_setup_fb(struct rcar_du_plane *plane)
|
static void rcar_du_plane_setup_fb(struct rcar_du_plane *plane)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *state =
|
struct rcar_du_plane_state *state =
|
||||||
to_rcar_du_plane_state(plane->plane.state);
|
to_rcar_plane_state(plane->plane.state);
|
||||||
struct drm_framebuffer *fb = plane->plane.state->fb;
|
struct drm_framebuffer *fb = plane->plane.state->fb;
|
||||||
struct rcar_du_group *rgrp = plane->group;
|
struct rcar_du_group *rgrp = plane->group;
|
||||||
unsigned int src_x = state->state.src_x >> 16;
|
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,
|
||||||
unsigned int index)
|
unsigned int index)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *state =
|
struct rcar_du_plane_state *state =
|
||||||
to_rcar_du_plane_state(plane->plane.state);
|
to_rcar_plane_state(plane->plane.state);
|
||||||
struct rcar_du_group *rgrp = plane->group;
|
struct rcar_du_group *rgrp = plane->group;
|
||||||
u32 colorkey;
|
u32 colorkey;
|
||||||
u32 pnmr;
|
u32 pnmr;
|
||||||
|
@ -172,7 +172,7 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,
|
||||||
unsigned int index)
|
unsigned int index)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *state =
|
struct rcar_du_plane_state *state =
|
||||||
to_rcar_du_plane_state(plane->plane.state);
|
to_rcar_plane_state(plane->plane.state);
|
||||||
struct rcar_du_group *rgrp = plane->group;
|
struct rcar_du_group *rgrp = plane->group;
|
||||||
u32 ddcr2 = PnDDCR2_CODE;
|
u32 ddcr2 = PnDDCR2_CODE;
|
||||||
u32 ddcr4;
|
u32 ddcr4;
|
||||||
|
@ -222,7 +222,7 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,
|
||||||
void rcar_du_plane_setup(struct rcar_du_plane *plane)
|
void rcar_du_plane_setup(struct rcar_du_plane *plane)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *state =
|
struct rcar_du_plane_state *state =
|
||||||
to_rcar_du_plane_state(plane->plane.state);
|
to_rcar_plane_state(plane->plane.state);
|
||||||
|
|
||||||
__rcar_du_plane_setup(plane, state->hwindex);
|
__rcar_du_plane_setup(plane, state->hwindex);
|
||||||
if (state->format->planes == 2)
|
if (state->format->planes == 2)
|
||||||
|
@ -234,7 +234,7 @@ void rcar_du_plane_setup(struct rcar_du_plane *plane)
|
||||||
static int rcar_du_plane_atomic_check(struct drm_plane *plane,
|
static int rcar_du_plane_atomic_check(struct drm_plane *plane,
|
||||||
struct drm_plane_state *state)
|
struct drm_plane_state *state)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *rstate = to_rcar_du_plane_state(state);
|
struct rcar_du_plane_state *rstate = to_rcar_plane_state(state);
|
||||||
struct rcar_du_plane *rplane = to_rcar_plane(plane);
|
struct rcar_du_plane *rplane = to_rcar_plane(plane);
|
||||||
struct rcar_du_device *rcdu = rplane->group->dev;
|
struct rcar_du_device *rcdu = rplane->group->dev;
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane)
|
||||||
struct rcar_du_plane_state *state;
|
struct rcar_du_plane_state *state;
|
||||||
struct rcar_du_plane_state *copy;
|
struct rcar_du_plane_state *copy;
|
||||||
|
|
||||||
state = to_rcar_du_plane_state(plane->state);
|
state = to_rcar_plane_state(plane->state);
|
||||||
copy = kmemdup(state, sizeof(*state), GFP_KERNEL);
|
copy = kmemdup(state, sizeof(*state), GFP_KERNEL);
|
||||||
if (copy == NULL)
|
if (copy == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -319,7 +319,7 @@ static void rcar_du_plane_atomic_destroy_state(struct drm_plane *plane,
|
||||||
if (state->fb)
|
if (state->fb)
|
||||||
drm_framebuffer_unreference(state->fb);
|
drm_framebuffer_unreference(state->fb);
|
||||||
|
|
||||||
kfree(to_rcar_du_plane_state(state));
|
kfree(to_rcar_plane_state(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rcar_du_plane_atomic_set_property(struct drm_plane *plane,
|
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,
|
||||||
struct drm_property *property,
|
struct drm_property *property,
|
||||||
uint64_t val)
|
uint64_t val)
|
||||||
{
|
{
|
||||||
struct rcar_du_plane_state *rstate = to_rcar_du_plane_state(state);
|
struct rcar_du_plane_state *rstate = to_rcar_plane_state(state);
|
||||||
struct rcar_du_device *rcdu = to_rcar_plane(plane)->group->dev;
|
struct rcar_du_device *rcdu = to_rcar_plane(plane)->group->dev;
|
||||||
|
|
||||||
if (property == rcdu->props.alpha)
|
if (property == rcdu->props.alpha)
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct rcar_du_plane_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct rcar_du_plane_state *
|
static inline struct rcar_du_plane_state *
|
||||||
to_rcar_du_plane_state(struct drm_plane_state *state)
|
to_rcar_plane_state(struct drm_plane_state *state)
|
||||||
{
|
{
|
||||||
return container_of(state, struct rcar_du_plane_state, state);
|
return container_of(state, struct rcar_du_plane_state, state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue