On 03/27/2018 05:08 PM, Ville Syrjälä wrote:
On Tue, Mar 27, 2018 at 04:26:17PM +0200, Thomas Hellstrom wrote:
Use the correct helper and also return early on helper
success rather than on helper failure.

Also explicitly return 0 in the case of no fb.

Signed-off-by: Thomas Hellstrom <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Reported-by: Daniel Vetter <[email protected]>
---
  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 3628a9fe705f..0f7dc9ea2657 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -494,23 +494,23 @@ int vmw_du_cursor_plane_atomic_check(struct drm_plane 
*plane,
                                     struct drm_plane_state *new_state)
  {
        int ret = 0;
+       struct drm_crtc_state *crtc_state = NULL;
        struct vmw_surface *surface = NULL;
        struct drm_framebuffer *fb = new_state->fb;
- struct drm_rect src = drm_plane_state_src(new_state);
-       struct drm_rect dest = drm_plane_state_dest(new_state);
-
        /* Turning off */
        if (!fb)
-               return ret;
+               return 0;
This should probably be checked after
drm_atomic_helper_check_plane_state() has been called. Otherwise
new_state->visible may be left with a stale value.


Thanks. I'll respin.

/Thomas

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to