[xf86-video-intel,1/2] sna: Fix dirtyfb detection
diff mbox series

Message ID 20191209150137.18578-1-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • [xf86-video-intel,1/2] sna: Fix dirtyfb detection
Related show

Commit Message

Ville Syrjala Dec. 9, 2019, 3:01 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Fix the accidentally swapped bpp and depth values passed to
the addfb ioctl when we're testing for dirtyfb presence.
Currently the addfb fails every time so we don't even test
the actual dirtyfb ioctl.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 src/sna/kgem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chris Wilson Dec. 9, 2019, 3:14 p.m. UTC | #1
Quoting Ville Syrjala (2019-12-09 15:01:36)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Fix the accidentally swapped bpp and depth values passed to
> the addfb ioctl when we're testing for dirtyfb presence.
> Currently the addfb fails every time so we don't even test
> the actual dirtyfb ioctl.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  src/sna/kgem.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/sna/kgem.c b/src/sna/kgem.c
> index 9c0708a635fb..6a35067c4107 100644
> --- a/src/sna/kgem.c
> +++ b/src/sna/kgem.c
> @@ -1538,8 +1538,8 @@ static bool test_has_dirtyfb(struct kgem *kgem)
>         create.width = 32;
>         create.height = 32;
>         create.pitch = 4*32;
> -       create.bpp = 24;
> -       create.depth = 32; /* {bpp:24, depth:32} -> x8r8g8b8 */
> +       create.bpp = 32;
> +       create.depth = 24; /* {bpp:32, depth:24} -> x8r8g8b8 */

I did good.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

Patch
diff mbox series

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 9c0708a635fb..6a35067c4107 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1538,8 +1538,8 @@  static bool test_has_dirtyfb(struct kgem *kgem)
 	create.width = 32;
 	create.height = 32;
 	create.pitch = 4*32;
-	create.bpp = 24;
-	create.depth = 32; /* {bpp:24, depth:32} -> x8r8g8b8 */
+	create.bpp = 32;
+	create.depth = 24; /* {bpp:32, depth:24} -> x8r8g8b8 */
 	create.handle = gem_create(kgem->fd, 1);
 	if (create.handle == 0)
 		return false;