Skip to content

Commit 1d2bb93

Browse files
Rob Clarkgregkh
authored andcommitted
drm/msm: Reject fb creation from _NO_SHARE objs
[ Upstream commit cf50ccd ] It would be an error to map these into kms->vm. So reject this as early as possible, when creating an fb. Fixes: b58e12a ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 79a357b commit 1d2bb93

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/msm/msm_fb.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,12 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
219219
+ mode_cmd->offsets[i];
220220

221221
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");
223228
goto fail;
224229
}
225230

0 commit comments

Comments
 (0)