Commit 6ff3ddca authored by Rob Clark's avatar Rob Clark

drm/msm/mdp5: don't be so casty

Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 0002d30f
...@@ -291,6 +291,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane, ...@@ -291,6 +291,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state) struct drm_plane_state *state)
{ {
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); 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; struct drm_plane_state *old_state = plane->state;
const struct mdp_format *format; const struct mdp_format *format;
bool vflip, hflip; bool vflip, hflip;
...@@ -353,10 +354,10 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane, ...@@ -353,10 +354,10 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
struct drm_crtc_state *crtc_state = struct drm_crtc_state *crtc_state =
drm_atomic_get_crtc_state(state->state, state->crtc); drm_atomic_get_crtc_state(state->state, state->crtc);
crtc_state->mode_changed = true; crtc_state->mode_changed = true;
to_mdp5_plane_state(state)->mode_changed = true; mdp5_state->mode_changed = true;
} }
} else { } else {
to_mdp5_plane_state(state)->mode_changed = true; mdp5_state->mode_changed = true;
} }
return 0; return 0;
...@@ -367,14 +368,15 @@ static void mdp5_plane_atomic_update(struct drm_plane *plane, ...@@ -367,14 +368,15 @@ static void mdp5_plane_atomic_update(struct drm_plane *plane,
{ {
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct drm_plane_state *state = plane->state; struct drm_plane_state *state = plane->state;
struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state);
DBG("%s: update", plane->name); DBG("%s: update", plane->name);
if (!plane_enabled(state)) { if (!plane_enabled(state)) {
to_mdp5_plane_state(state)->pending = true; mdp5_state->pending = true;
} else if (to_mdp5_plane_state(state)->mode_changed) { } else if (mdp5_state->mode_changed) {
int ret; int ret;
to_mdp5_plane_state(state)->pending = true; mdp5_state->pending = true;
ret = mdp5_plane_mode_set(plane, ret = mdp5_plane_mode_set(plane,
state->crtc, state->fb, state->crtc, state->fb,
state->crtc_x, state->crtc_y, state->crtc_x, state->crtc_y,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment