On Fri, Mar 8, 2019 at 3:27 AM Tomeu Vizoso <tomeu.viz...@collabora.com> wrote: > > Also use the raw GPU ID value to decide whether to use SFD or MFD. > > Signed-off-by: Tomeu Vizoso <tomeu.viz...@collabora.com> > --- > src/gallium/drivers/panfrost/pan_context.c | 66 ++++++++++------------ > src/gallium/drivers/panfrost/pan_context.h | 10 ++++ > src/gallium/drivers/panfrost/pan_screen.h | 1 + > 3 files changed, 41 insertions(+), 36 deletions(-)
> @@ -2724,8 +2712,14 @@ struct pipe_context * > panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned > flags) > { > struct panfrost_context *ctx = CALLOC_STRUCT(panfrost_context); > + struct panfrost_screen *pscreen = pan_screen(screen); > memset(ctx, 0, sizeof(*ctx)); > struct pipe_context *gallium = (struct pipe_context *) ctx; > + unsigned gpu_id; > + > + gpu_id = pscreen->driver->query_gpu_version(pscreen); > + ctx->is_t6xx = gpu_id <= 0x0750; /* For now, this flag means t76x or > less */ This doesn't work for t604 which has a special version of 0x6???. That helpfully also collides with bifrost versions. We could fix this up in the kernel to expose it as 0x0600. Then an 'is_bifrost' would be an easy (gpu_id & 0xf000). Why isn't this 'is_t8xx' instead as you are touching it everywhere or this needs to be t8xx and bifrost? If not you could just do ((gpu_id & 0xff00) == 0x0800). Rob _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev