Hi

Am 22.01.26 um 10:28 schrieb Icenowy Zheng:
在 2026-01-21星期三的 13:56 +0100,Thomas Zimmermann写道:

============== 8< =======================
+static int vs_gem_dumb_create(struct drm_file *file_priv,
+                             struct drm_device *drm,
+                             struct drm_mode_create_dumb *args)
+{
+       /* The hardware wants 128B-aligned pitches for linear
buffers. */
+       args->pitch = ALIGN(DIV_ROUND_UP(args->width * args->bpp,
8), 128);
Please use the new drm_mode_align_dumb() instead.
It seems to be still a static function, at least in 6.19-rc1 .

It looks like I should put a call to drm_mode_size_dumb() here, is this
correct?

Yes, sorry, my bad. drm_mode_size_dumb() is the correct interface.

Best regards
Thomas


Thanks,
Icenowy

+
+       return drm_gem_dma_dumb_create_internal(file_priv, drm,
args);
+}
+

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)


Reply via email to