Message ID | 20170405123456.4425-1-p.zabel@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Philipp On 5 April 2017 at 13:34, Philipp Zabel <p.zabel@pengutronix.de> wrote: > Import the etnaviv header changes from kernel commits 9ad59fea162c > ("drm/etnaviv: submit support for in-fences") and 78ec187f64fa > ("drm/etnaviv: submit support for out-fences") for fence fd support. > Looking for 9ad59fea162c in airlied/drm-next and drm/drm-misc/{drm-misc-next,for-linux-next} shows no references. Can I suggest updating the header as described in include/drm/README "When and how to update these files" ? Thanks Emil
Hi Emil, On Thu, 2017-04-06 at 12:08 +0100, Emil Velikov wrote: > Hi Philipp > > On 5 April 2017 at 13:34, Philipp Zabel <p.zabel@pengutronix.de> wrote: > > Import the etnaviv header changes from kernel commits 9ad59fea162c > > ("drm/etnaviv: submit support for in-fences") and 78ec187f64fa > > ("drm/etnaviv: submit support for out-fences") for fence fd support. > > > Looking for 9ad59fea162c in airlied/drm-next and > drm/drm-misc/{drm-misc-next,for-linux-next} shows no references. They are still pending in the "etnaviv-next for 4.12" pull request at https://git.pengutronix.de/git/lst/linux etnaviv/next > Can I suggest updating the header as described in include/drm/README > "When and how to update these files" ? Thanks for pointing this out, I wasn't aware of that README file. I'll respin this with the appropriate comments once the kernel patches are merged. regards Philipp
diff --git a/etnaviv/etnaviv_drm.h b/etnaviv/etnaviv_drm.h index 2584c1cc..76f6f78a 100644 --- a/etnaviv/etnaviv_drm.h +++ b/etnaviv/etnaviv_drm.h @@ -154,6 +154,12 @@ struct drm_etnaviv_gem_submit_bo { * one or more cmdstream buffers. This allows for conditional execution * (context-restore), and IB buffers needed for per tile/bin draw cmds. */ +#define ETNA_SUBMIT_NO_IMPLICIT 0x0001 +#define ETNA_SUBMIT_FENCE_FD_IN 0x0002 +#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 +#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \ + ETNA_SUBMIT_FENCE_FD_IN | \ + ETNA_SUBMIT_FENCE_FD_OUT) #define ETNA_PIPE_3D 0x00 #define ETNA_PIPE_2D 0x01 #define ETNA_PIPE_VG 0x02 @@ -167,6 +173,8 @@ struct drm_etnaviv_gem_submit { __u64 bos; /* in, ptr to array of submit_bo's */ __u64 relocs; /* in, ptr to array of submit_reloc's */ __u64 stream; /* in, ptr to cmdstream */ + __u32 flags; /* in, mask of ETNA_SUBMIT_x */ + __s32 fence_fd; /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */ }; /* The normal way to synchronize with the GPU is just to CPU_PREP on
Import the etnaviv header changes from kernel commits 9ad59fea162c ("drm/etnaviv: submit support for in-fences") and 78ec187f64fa ("drm/etnaviv: submit support for out-fences") for fence fd support. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> --- etnaviv/etnaviv_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+)