projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92e5b0a
)
drm/nv10/plane: add downscaling restrictions
author
Ilia Mirkin
<imirkin@alum.mit.edu>
Fri, 15 Nov 2013 16:26:42 +0000
(11:26 -0500)
committer
Ben Skeggs
<bskeggs@redhat.com>
Tue, 3 Dec 2013 13:28:54 +0000
(23:28 +1000)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv04/overlay.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
index 514a3055903c1d277049fc82dc7302b826430447..c14afb79414708e0664e38a0fcf1ead53b03f7fd 100644
(file)
--- a/
drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/
drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@
-112,7
+112,15
@@
nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
format = ALIGN(src_w * 4, 0x100);
if (format > 0xffff)
- return -EINVAL;
+ return -ERANGE;
+
+ if (dev->chipset >= 0x30) {
+ if (crtc_w < (src_w >> 1) || crtc_h < (src_h >> 1))
+ return -ERANGE;
+ } else {
+ if (crtc_w < (src_w >> 3) || crtc_h < (src_h >> 3))
+ return -ERANGE;
+ }
ret = nouveau_bo_pin(nv_fb->nvbo, TTM_PL_FLAG_VRAM);
if (ret)