<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Michel Dänzer <michel@daenzer.net><br>
<b>Sent:</b> Friday, January 11, 2019 10:22:07 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Yu Zhao<br>
<b>Subject:</b> [PATCH] Revert "drm/amdgpu: validate user pitch alignment"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Michel Dänzer <michel.daenzer@amd.com><br>
<br>
The check turned out to be too strict in some cases.<br>
<br>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 ----------<br>
1 file changed, 10 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
index 70a816dd8b4d..4e944737b708 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
@@ -531,16 +531,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,<br>
struct drm_gem_object *obj;<br>
struct amdgpu_framebuffer *amdgpu_fb;<br>
int ret;<br>
- struct amdgpu_device *adev = dev->dev_private;<br>
- int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);<br>
- int pitch = mode_cmd->pitches[0] / cpp;<br>
-<br>
- pitch = amdgpu_align_pitch(adev, pitch, cpp, false);<br>
- if (mode_cmd->pitches[0] != pitch) {<br>
- DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",<br>
- pitch, mode_cmd->pitches[0]);<br>
- return ERR_PTR(-EINVAL);<br>
- }<br>
<br>
obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);<br>
if (obj == NULL) {<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>