[PATCH 05/19] drm: move dev_mapping to the minor node

Ilija Hadzic ihadzic at research.bell-labs.com
Mon Apr 30 09:52:50 PDT 2012

On Mon, 30 Apr 2012, Dave Airlie wrote:

> When we move a buffer from VRAM->RAM we have to invalidate all
> userspace mappings for it.
> There could be userspace mappings on any of the device nodes, so we
> need to get them all.

Ah OK, I get it ... and the reason you don't have to do this when you have 
multiple physical cards, but only one node per card (i.e. current state of 
the code) is that VRAMs of each card are disjoint, so there can't possibly 
be mappings through different /dev/dri/whatever of the same piece of VRAM. 
Multiple render nodes, introduce that possibility.

> I think some of this code could be redone, to be less complex, Al Viro
> questions why we weren't just setting the
> inode mapping ourselves, citing some references in an fs somewhere
> (maybe cifs), I haven't had time to follow up and check.
> This would also make the case where you have something else create a
> device node inside a chroot.

Do you have pointers to that discussion (assuming it was on sime mailing 
list)? The least I can do, while I am at it, is try to understand it and
see if I can incorporate some ideas from there in the rework of the patch.

-- Ilija

More information about the dri-devel mailing list