Skip to content

etnaviv: Make sure to track different pipe_screens for different DRM device descriptions

Daniel Abrecht requested to merge DPA/mesa:etnaviv_kmsfd_fix_2 into master

pipe_screens that are created used to be dedublicated directly based on the gpu device file. If a process created two of them, for example by opening the etnaviv render node twice and calling gbm_create_device, or by opening two card nodes which used kmsro, or any combination of these things, then for any but the first instance, the gem handles created for it would be for the first one instead of the intended one, due to them being created using the same pipe_screen, and buffers allocated for kmsro devices would be allocated using the wrong file description as well. This can lead to various problems, such as a proccess not being able to use two cards which use kmsro at the same time, for example.

This patch changes the dedublication to be done based on the gpu device description rather than based on the gpu device file. This will solve the above mentioned problem, but there will now be only a few cases in which anything is dedublicated at all.

This is an alternative !6610 (closed). It solves the same problem, but does a lot less dedublication.

Signed-off-by: Daniel Abrecht public@danielabrecht.ch

Edited by Daniel Abrecht

Merge request reports