Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-05 Thread Daniel Stone
Hi, On Fri, 5 Jul 2019 at 14:51, Alyssa Rosenzweig wrote: > > + switch(whandle->modifier) { > > + case DRM_FORMAT_MOD_ARM_AFBC(AFBC_FORMAT_MOD_ROCKCHIP): > > + rsc->layout = PAN_AFBC; > > + break; > > Why ROCKCHIP in particular? AFBC fourcc codes are based on modif

Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-05 Thread Alyssa Rosenzweig
> Again, the winsys just pulls the list of acceptable format/modifier > pairs from the EGL format query. If Panfrost declares 1555+AFBC to be > a supported combination, then the winsys will pass that on for clients > to use. If it isn't working, my suggestion is to just never advertise > it in the

Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-05 Thread Alyssa Rosenzweig
> + switch(whandle->modifier) { > + case DRM_FORMAT_MOD_ARM_AFBC(AFBC_FORMAT_MOD_ROCKCHIP): > + rsc->layout = PAN_AFBC; > + break; Why ROCKCHIP in particular? AFBC fourcc codes are based on modifiers, and there are a *lot* of them. We need to figure out which upstre

Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-04 Thread Daniel Stone
Hi, On Thu, 4 Jul 2019 at 09:47, Tomeu Vizoso wrote: > On Thu, 4 Jul 2019 at 10:05, Tomeu Vizoso wrote: > > -pres->layout = should_tile ? PAN_TILED : PAN_LINEAR; > > + if (want_afbc || (is_renderable && can_afbc && !is_texture)) > > +pres->layout = PAN_AFBC; > > We

Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-04 Thread Daniel Stone
Hi Tomeu, On Thu, 4 Jul 2019 at 09:05, Tomeu Vizoso wrote: > @@ -362,14 +392,19 @@ panfrost_resource_create_bo(struct panfrost_screen > *screen, struct panfrost_reso > > /* Tiling textures is almost always faster, unless we only use it > once */ > > +bool can_afbc = panfrost_fo

Re: [Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-04 Thread Tomeu Vizoso
On Thu, 4 Jul 2019 at 10:05, Tomeu Vizoso wrote: > > Implement query_dmabuf_modifiers and resource_create_with_modifiers so > Wayland clients can share AFBC buffers with the compositor. > > For now this is guarded behind the PAN_MESA_DEBUG=modifiers env var > because implementing those callbacks c

[Mesa-dev] [PATCH 3/3] panfrost: Add support for modifiers

2019-07-04 Thread Tomeu Vizoso
Implement query_dmabuf_modifiers and resource_create_with_modifiers so Wayland clients can share AFBC buffers with the compositor. For now this is guarded behind the PAN_MESA_DEBUG=modifiers env var because implementing those callbacks causes Weston to try to pass modifiers to the Rockchip KMS dri