summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/mdp
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2016-11-01 11:33:58 -0400
committerRob Clark <robdclark@gmail.com>2016-11-27 11:23:13 -0500
commit6ff3ddca2a69add204d0168787213eaec1411868 (patch)
tree5852a9beaf72e9c797c67148c86ee4ba9572b418 /drivers/gpu/drm/msm/mdp
parent0002d30f3f824907af413d254f9363687095187b (diff)
drm/msm/mdp5: don't be so casty
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/mdp')
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index c3e52c57ec20..629ff7ab17e3 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -291,6 +291,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state)
{
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
+ struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state);
struct drm_plane_state *old_state = plane->state;
const struct mdp_format *format;
bool vflip, hflip;
@@ -353,10 +354,10 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
struct drm_crtc_state *crtc_state =
drm_atomic_get_crtc_state(state->state, state->crtc);
crtc_state->mode_changed = true;
- to_mdp5_plane_state(state)->mode_changed = true;
+ mdp5_state->mode_changed = true;
}
} else {
- to_mdp5_plane_state(state)->mode_changed = true;
+ mdp5_state->mode_changed = true;
}
return 0;
@@ -367,14 +368,15 @@ static void mdp5_plane_atomic_update(struct drm_plane *plane,
{
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct drm_plane_state *state = plane->state;
+ struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state);
DBG("%s: update", plane->name);
if (!plane_enabled(state)) {
- to_mdp5_plane_state(state)->pending = true;
- } else if (to_mdp5_plane_state(state)->mode_changed) {
+ mdp5_state->pending = true;
+ } else if (mdp5_state->mode_changed) {
int ret;
- to_mdp5_plane_state(state)->pending = true;
+ mdp5_state->pending = true;
ret = mdp5_plane_mode_set(plane,
state->crtc, state->fb,
state->crtc_x, state->crtc_y,