Displaying 2 results from an estimated 2 matches for "msm_bo_scanout".
2025 Jan 09
1
[PATCH v2 13/25] drm/msm: Compute dumb-buffer sizes with drm_mode_size_dumb()
...+ if (!info)
+ return -EINVAL;
+ pitch_align = drm_format_info_min_pitch(info, 0, SZ_32);
+ if (!pitch_align || pitch_align > U32_MAX)
+ return -EINVAL;
+ ret = drm_mode_size_dumb(dev, args, pitch_align, 0);
+ if (ret)
+ return ret;
+
return msm_gem_new_handle(dev, file, args->size,
MSM_BO_SCANOUT | MSM_BO_WC, &args->handle, "dumb");
}
--
2.47.1
2025 Jan 09
25
[PATCH v2 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation
Dumb-buffer pitch and size is specified by width, height, bits-per-pixel
plus various hardware-specific alignments. The calculation of these
values is inconsistent and duplicated among drivers. The results for
formats with bpp < 8 are incorrect.
This series fixes this for most drivers. Default scanline pitch and
buffer size are now calculated with the existing 4CC helpers. There is
a new