mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
drm: omapdrm: move omap_plane_reset()
Move omap_plane_reset() function to avoid forward declarations in the next patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
e1c49bdcdb
commit
e07323cf1b
1 changed files with 27 additions and 27 deletions
|
@ -188,33 +188,6 @@ static const struct drm_plane_helper_funcs omap_plane_helper_funcs = {
|
||||||
.atomic_disable = omap_plane_atomic_disable,
|
.atomic_disable = omap_plane_atomic_disable,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void omap_plane_reset(struct drm_plane *plane)
|
|
||||||
{
|
|
||||||
struct omap_plane *omap_plane = to_omap_plane(plane);
|
|
||||||
struct omap_plane_state *omap_state;
|
|
||||||
|
|
||||||
if (plane->state && plane->state->fb)
|
|
||||||
drm_framebuffer_unreference(plane->state->fb);
|
|
||||||
|
|
||||||
kfree(plane->state);
|
|
||||||
plane->state = NULL;
|
|
||||||
|
|
||||||
omap_state = kzalloc(sizeof(*omap_state), GFP_KERNEL);
|
|
||||||
if (omap_state == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set defaults depending on whether we are a primary or overlay
|
|
||||||
* plane.
|
|
||||||
*/
|
|
||||||
omap_state->zorder = plane->type == DRM_PLANE_TYPE_PRIMARY
|
|
||||||
? 0 : omap_plane->id;
|
|
||||||
omap_state->base.rotation = BIT(DRM_ROTATE_0);
|
|
||||||
|
|
||||||
plane->state = &omap_state->base;
|
|
||||||
plane->state->plane = plane;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void omap_plane_destroy(struct drm_plane *plane)
|
static void omap_plane_destroy(struct drm_plane *plane)
|
||||||
{
|
{
|
||||||
struct omap_plane *omap_plane = to_omap_plane(plane);
|
struct omap_plane *omap_plane = to_omap_plane(plane);
|
||||||
|
@ -270,6 +243,33 @@ static void omap_plane_atomic_destroy_state(struct drm_plane *plane,
|
||||||
kfree(to_omap_plane_state(state));
|
kfree(to_omap_plane_state(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void omap_plane_reset(struct drm_plane *plane)
|
||||||
|
{
|
||||||
|
struct omap_plane *omap_plane = to_omap_plane(plane);
|
||||||
|
struct omap_plane_state *omap_state;
|
||||||
|
|
||||||
|
if (plane->state && plane->state->fb)
|
||||||
|
drm_framebuffer_unreference(plane->state->fb);
|
||||||
|
|
||||||
|
kfree(plane->state);
|
||||||
|
plane->state = NULL;
|
||||||
|
|
||||||
|
omap_state = kzalloc(sizeof(*omap_state), GFP_KERNEL);
|
||||||
|
if (omap_state == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set defaults depending on whether we are a primary or overlay
|
||||||
|
* plane.
|
||||||
|
*/
|
||||||
|
omap_state->zorder = plane->type == DRM_PLANE_TYPE_PRIMARY
|
||||||
|
? 0 : omap_plane->id;
|
||||||
|
omap_state->base.rotation = BIT(DRM_ROTATE_0);
|
||||||
|
|
||||||
|
plane->state = &omap_state->base;
|
||||||
|
plane->state->plane = plane;
|
||||||
|
}
|
||||||
|
|
||||||
static int omap_plane_atomic_set_property(struct drm_plane *plane,
|
static int omap_plane_atomic_set_property(struct drm_plane *plane,
|
||||||
struct drm_plane_state *state,
|
struct drm_plane_state *state,
|
||||||
struct drm_property *property,
|
struct drm_property *property,
|
||||||
|
|
Loading…
Add table
Reference in a new issue