Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm: Reject fb creation from _NO_SHARE objs

It would be an error to map these into kms->vm. So reject this as early
as possible, when creating an fb.

Fixes: b58e12a66e47 ("drm/msm: Add _NO_SHARE flag")
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/714264/
Message-ID: <20260325185926.1265661-1-robin.clark@oss.qualcomm.com>

Rob Clark cf50ccdb d4ef6d77

+6 -1
+6 -1
drivers/gpu/drm/msm/msm_fb.c
··· 219 219 + mode_cmd->offsets[i]; 220 220 221 221 if (bos[i]->size < min_size) { 222 - ret = -EINVAL; 222 + ret = UERR(EINVAL, dev, "plane %d too small", i); 223 + goto fail; 224 + } 225 + 226 + if (to_msm_bo(bos[i])->flags & MSM_BO_NO_SHARE) { 227 + ret = UERR(EINVAL, dev, "Cannot map _NO_SHARE to kms vm"); 223 228 goto fail; 224 229 } 225 230