Hi, > These are both from Gerd. Gerd, do you have any objection to using a > union to provide either the dmabuf fd or region index? No. > > It's like we want to propose a general interface used to share > > guest's buffer with host. And the > > general interface, so far, has two choice: region and dma-buf. So > > each mdev likes this interface > > can implement one kind of it and gets the benefit from the general > > interface. > > So, if we think about this, the difference in user mode should be > > as little as possible. > > The difference seems pretty minimal here, the user probes supported > interface types, and explicitly picks one by requesting updates using > that interface type. The difference is only in the interpretation of > one dword field. Furthermore, we're not limiting ourselves to these > two interface types, this same API could support dmabuf-v2 if we > define > a flag bit for it and define the structure of the interface union. Yep, using the flags is more future-proof and continues to work in case another interface type shows up (unlike looking for a gfx region being present). > > Agree, that's a good proposal, which can handle all the cases. > > I'm just not sure about the usage case of "on every call". In > > previous discussion, it seems we think static is enough. > > Is it somehow a problem for the user to set the type bit in the flag > on > every call? Not at all. cheers, Gerd _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel