All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mesa 1/3] nv30: Fix max width / height checks in nv30 sifm code
@ 2015-09-07 19:50 Hans de Goede
  2015-09-07 19:50 ` [PATCH mesa 2/3] nv30: Fix color resolving for nv3x cards Hans de Goede
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hans de Goede @ 2015-09-07 19:50 UTC (permalink / raw)
  To: Ilia Mirkin, mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

The sifm object has a limit of 1024x1024 for its input size and 2048x2048
for its output. The code checking this was trying to be clever resulting
in it seeing a surface of e.g 1024x256 being outside of the input size
limit.

This commit fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 src/gallium/drivers/nouveau/nv30/nv30_transfer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
index 214da65..2452071 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
@@ -371,7 +371,7 @@ nv30_transfer_rect_blit(XFER_ARGS)
 static bool
 nv30_transfer_sifm(XFER_ARGS)
 {
-   if (!src->pitch || (src->w | src->h) > 1024 || src->w < 2 || src->h < 2)
+   if (!src->pitch || src->w > 1024 || src->h > 1024 || src->w < 2 || src->h < 2)
       return false;
 
    if (src->d > 1 || dst->d > 1)
@@ -381,7 +381,7 @@ nv30_transfer_sifm(XFER_ARGS)
       return false;
 
    if (!dst->pitch) {
-      if ((dst->w | dst->h) > 2048 || dst->w < 2 || dst->h < 2)
+      if (dst->w > 2048 || dst->h > 2048 || dst->w < 2 || dst->h < 2)
          return false;
    } else {
       if (dst->domain != NOUVEAU_BO_VRAM)
-- 
2.4.3

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-09-09 13:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 19:50 [PATCH mesa 1/3] nv30: Fix max width / height checks in nv30 sifm code Hans de Goede
2015-09-07 19:50 ` [PATCH mesa 2/3] nv30: Fix color resolving for nv3x cards Hans de Goede
     [not found]   ` <1441655450-9336-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-07 19:55     ` Ilia Mirkin
     [not found]       ` <CAKb7Uvhk56knb4ovaSrMDrOXKQq4ODJm3n1xhwQ+q=2jiNGbvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08  7:53         ` Hans de Goede
     [not found]           ` <55EE93EC.1090100-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-09 13:42             ` Hans de Goede
2015-09-07 19:50 ` [PATCH mesa 3/3] nv30: Disable msaa for now because it causes lockups Hans de Goede
2015-09-07 20:00   ` Ilia Mirkin
2015-09-08  8:00     ` Hans de Goede
     [not found]       ` <55EE95A6.5040307-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-08  8:48         ` Ben Skeggs
     [not found] ` <1441655450-9336-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-07 19:52   ` [PATCH mesa 1/3] nv30: Fix max width / height checks in nv30 sifm code Ilia Mirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.