Skip to contentSkip to conversation

Frame buffer access performance

DISCUSSION Enrico Weigelt, metux IT consult 2 participants 4 messages Aug 5, 2016

lore
Share & tools
lore
#1 lore raw
Quoted 6 lines · metux IT consult

Hi folks,

when putting pixels into an DRM framebuffer, should I do that in bursts/blocks instead of byte-per-byte ? (eg. explicitly using aligned 32bit ops).

There's a driver cap DRM_CAP_DUMB_PREFER_SHADOW for this. If set, render into a shadow buffer and copy over in bursts, otherwise you can assume that the memory is fully cpu cached and fast with random access. Note that this is just for dumb buffers, which are explicitly not meant as the fastest memory, but the most convenient (i.e. untiled). -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

On 05.08.2016 10:15, Daniel Vetter wrote:

Hi,

Quoted 4 lines

There's a driver cap DRM_CAP_DUMB_PREFER_SHADOW for this. If set, render into a shadow buffer and copy over in bursts, otherwise you can assume that the memory is fully cpu cached and fast with random access.

aaaah!

nekrad@orion:~/src/linux$ git grep prefer_shadow drivers/gpu/drm/i915
drivers/gpu/drm/i915/intel_display.c:   dev->mode_config.prefer_shadow = 1;

IOW: i915 driver (my notebook here has an i915) sets that flag, so it seems my guess is right.

Do we already have some suitable double-buffer helpers, which can detect changed regions and copy over in bursts, so userland doesn't need extra logic for that ? (hmm, maybe some cow + pagefault magic?)

... seems I need to give it some further thoughts ...

--mtx

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 14 lines · metux IT consult

On 05.08.2016 10:15, Daniel Vetter wrote:

Hi,

Quoted 4 lines

There's a driver cap DRM_CAP_DUMB_PREFER_SHADOW for this. If set, render into a shadow buffer and copy over in bursts, otherwise you can assume that the memory is fully cpu cached and fast with random access.

aaaah!

nekrad@orion:~/src/linux$ git grep prefer_shadow drivers/gpu/drm/i915
drivers/gpu/drm/i915/intel_display.c:   dev->mode_config.prefer_shadow = 1;
Quoted 8 lines

IOW: i915 driver (my notebook here has an i915) sets that flag, so it seems my guess is right.

Do we already have some suitable double-buffer helpers, which can detect changed regions and copy over in bursts, so userland doesn't need extra logic for that ? (hmm, maybe some cow + pagefault magic?)

... seems I need to give it some further thoughts ...

DIRTY_FB ioctl. But that's for other manual uplaod displays and similar things.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel