summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tidss/tidss_plane.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tidss/tidss_plane.c')
-rw-r--r--drivers/gpu/drm/tidss/tidss_plane.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/gpu/drm/tidss/tidss_plane.c b/drivers/gpu/drm/tidss/tidss_plane.c
index 795d24b44091..2674fffa67e2 100644
--- a/drivers/gpu/drm/tidss/tidss_plane.c
+++ b/drivers/gpu/drm/tidss/tidss_plane.c
@@ -20,7 +20,7 @@
/* drm_plane_helper_funcs */
static int tidss_plane_atomic_check(struct drm_plane *plane,
- struct drm_plane_state *state)
+ struct drm_plane_state *new_plane_state)
{
struct drm_device *ddev = plane->dev;
struct tidss_device *tidss = to_tidss(ddev);
@@ -33,20 +33,22 @@ static int tidss_plane_atomic_check(struct drm_plane *plane,
dev_dbg(ddev->dev, "%s\n", __func__);
- if (!state->crtc) {
+ if (!new_plane_state->crtc) {
/*
* The visible field is not reset by the DRM core but only
* updated by drm_plane_helper_check_state(), set it manually.
*/
- state->visible = false;
+ new_plane_state->visible = false;
return 0;
}
- crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
+ crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
- ret = drm_atomic_helper_check_plane_state(state, crtc_state, 0,
+ ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
+ 0,
INT_MAX, true, true);
if (ret < 0)
return ret;
@@ -63,35 +65,37 @@ static int tidss_plane_atomic_check(struct drm_plane *plane,
* check for odd height).
*/
- finfo = drm_format_info(state->fb->format->format);
+ finfo = drm_format_info(new_plane_state->fb->format->format);
- if ((state->src_x >> 16) % finfo->hsub != 0) {
+ if ((new_plane_state->src_x >> 16) % finfo->hsub != 0) {
dev_dbg(ddev->dev,
"%s: x-position %u not divisible subpixel size %u\n",
- __func__, (state->src_x >> 16), finfo->hsub);
+ __func__, (new_plane_state->src_x >> 16), finfo->hsub);
return -EINVAL;
}
- if ((state->src_y >> 16) % finfo->vsub != 0) {
+ if ((new_plane_state->src_y >> 16) % finfo->vsub != 0) {
dev_dbg(ddev->dev,
"%s: y-position %u not divisible subpixel size %u\n",
- __func__, (state->src_y >> 16), finfo->vsub);
+ __func__, (new_plane_state->src_y >> 16), finfo->vsub);
return -EINVAL;
}
- if ((state->src_w >> 16) % finfo->hsub != 0) {
+ if ((new_plane_state->src_w >> 16) % finfo->hsub != 0) {
dev_dbg(ddev->dev,
"%s: src width %u not divisible by subpixel size %u\n",
- __func__, (state->src_w >> 16), finfo->hsub);
+ __func__, (new_plane_state->src_w >> 16),
+ finfo->hsub);
return -EINVAL;
}
- if (!state->visible)
+ if (!new_plane_state->visible)
return 0;
- hw_videoport = to_tidss_crtc(state->crtc)->hw_videoport;
+ hw_videoport = to_tidss_crtc(new_plane_state->crtc)->hw_videoport;
- ret = dispc_plane_check(tidss->dispc, hw_plane, state, hw_videoport);
+ ret = dispc_plane_check(tidss->dispc, hw_plane, new_plane_state,
+ hw_videoport);
if (ret)
return ret;