panfrost: Ensure open_device has pandecode initialized
Requires reordering some calls. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
This commit is contained in:
parent
dd3bda22f4
commit
072cc5d5f1
|
@ -776,9 +776,10 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
|||
return NULL;
|
||||
|
||||
struct panfrost_device *dev = pan_device(&screen->base);
|
||||
panfrost_open_device(screen, fd, dev);
|
||||
|
||||
/* Debug must be set first for pandecode to work correctly */
|
||||
dev->debug = debug_get_flags_option("PAN_MESA_DEBUG", panfrost_debug_options, 0);
|
||||
panfrost_open_device(screen, fd, dev);
|
||||
|
||||
if (dev->debug & PAN_DBG_NO_AFBC)
|
||||
dev->quirks |= MIDGARD_NO_AFBC;
|
||||
|
@ -812,9 +813,6 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (dev->debug & (PAN_DBG_TRACE | PAN_DBG_SYNC))
|
||||
pandecode_initialize(!(dev->debug & PAN_DBG_TRACE));
|
||||
|
||||
screen->base.destroy = panfrost_destroy_screen;
|
||||
|
||||
screen->base.get_name = panfrost_get_name;
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#include "panfrost-quirks.h"
|
||||
#include "pan_bo.h"
|
||||
#include "pan_texture.h"
|
||||
#include "wrap.h"
|
||||
#include "pan_util.h"
|
||||
|
||||
/* Abstraction over the raw drm_panfrost_get_param ioctl for fetching
|
||||
* information about devices */
|
||||
|
@ -247,6 +249,10 @@ panfrost_open_device(void *memctx, int fd, struct panfrost_device *dev)
|
|||
for (unsigned i = 0; i < ARRAY_SIZE(dev->bo_cache.buckets); ++i)
|
||||
list_inithead(&dev->bo_cache.buckets[i]);
|
||||
|
||||
/* Initialize pandecode before we start allocating */
|
||||
if (dev->debug & (PAN_DBG_TRACE | PAN_DBG_SYNC))
|
||||
pandecode_initialize(!(dev->debug & PAN_DBG_TRACE));
|
||||
|
||||
/* Tiler heap is internally required by the tiler, which can only be
|
||||
* active for a single job chain at once, so a single heap can be
|
||||
* shared across batches/contextes */
|
||||
|
|
Loading…
Reference in New Issue