]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Revert "drm/amdgpu: validate user pitch alignment"
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 11 Jan 2019 15:21:02 +0000 (16:21 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jan 2019 16:14:25 +0000 (11:14 -0500)
The check turned out to be too strict in some cases.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

index cb72d9675ab18600197b32c30a5298f1369307ca..b083b219b1a966e9e38c318cb30c91e478f650c7 100644 (file)
@@ -531,16 +531,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
        struct drm_gem_object *obj;
        struct amdgpu_framebuffer *amdgpu_fb;
        int ret;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-
-       pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-       if (mode_cmd->pitches[0] != pitch) {
-               DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-                             pitch, mode_cmd->pitches[0]);
-               return ERR_PTR(-EINVAL);
-       }
 
        obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
        if (obj ==  NULL) {