mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
nouveau: remove use of deprecated nouveau_device::drm_version
v2. update for libdrm nouveau_drm::lib_version removal Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
a458ffacba
commit
1a9ec8e062
7 changed files with 15 additions and 12 deletions
|
|
@ -336,9 +336,10 @@ nv50_miptree_create(struct pipe_screen *pscreen,
|
|||
const struct pipe_resource *templ)
|
||||
{
|
||||
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
|
||||
struct nouveau_drm *drm = nouveau_screen(pscreen)->drm;
|
||||
struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
|
||||
struct pipe_resource *pt = &mt->base.base;
|
||||
bool compressed = dev->drm_version >= 0x01000101;
|
||||
bool compressed = drm->version >= 0x01000101;
|
||||
int ret;
|
||||
union nouveau_bo_config bo_config;
|
||||
uint32_t bo_flags;
|
||||
|
|
|
|||
|
|
@ -523,11 +523,11 @@ nv50_screen_init_hwctx(struct nv50_screen *screen)
|
|||
}
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(ZETA_COMP_ENABLE), 1);
|
||||
PUSH_DATA(push, screen->base.device->drm_version >= 0x01000101);
|
||||
PUSH_DATA(push, screen->base.drm->version >= 0x01000101);
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(RT_COMP_ENABLE(0)), 8);
|
||||
for (i = 0; i < 8; ++i)
|
||||
PUSH_DATA(push, screen->base.device->drm_version >= 0x01000101);
|
||||
PUSH_DATA(push, screen->base.drm->version >= 0x01000101);
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(RT_CONTROL), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
|
|
|
|||
|
|
@ -248,9 +248,10 @@ nvc0_miptree_create(struct pipe_screen *pscreen,
|
|||
const struct pipe_resource *templ)
|
||||
{
|
||||
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
|
||||
struct nouveau_drm *drm = nouveau_screen(pscreen)->drm;
|
||||
struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
|
||||
struct pipe_resource *pt = &mt->base.base;
|
||||
bool compressed = dev->drm_version >= 0x01000101;
|
||||
bool compressed = drm->version >= 0x01000101;
|
||||
int ret;
|
||||
union nouveau_bo_config bo_config;
|
||||
uint32_t bo_flags;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ nvc0_screen_get_driver_query_group_info(struct pipe_screen *pscreen,
|
|||
count++;
|
||||
#endif
|
||||
|
||||
if (screen->base.device->drm_version >= 0x01000101) {
|
||||
if (screen->base.drm->version >= 0x01000101) {
|
||||
if (screen->compute) {
|
||||
if (screen->base.class_3d == NVE4_3D_CLASS) {
|
||||
count += 2;
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ nvc0_hw_metric_get_driver_query_info(struct nvc0_screen *screen, unsigned id,
|
|||
uint16_t class_3d = screen->base.class_3d;
|
||||
int count = 0;
|
||||
|
||||
if (screen->base.device->drm_version >= 0x01000101) {
|
||||
if (screen->base.drm->version >= 0x01000101) {
|
||||
if (screen->compute) {
|
||||
if (screen->base.class_3d == NVE4_3D_CLASS) {
|
||||
count += NVE4_HW_METRIC_QUERY_COUNT;
|
||||
|
|
|
|||
|
|
@ -1121,7 +1121,7 @@ nvc0_hw_sm_create_query(struct nvc0_context *nvc0, unsigned type)
|
|||
struct nvc0_hw_query *hq;
|
||||
unsigned space;
|
||||
|
||||
if (nvc0->screen->base.device->drm_version < 0x01000101)
|
||||
if (nvc0->screen->base.drm->version < 0x01000101)
|
||||
return NULL;
|
||||
|
||||
if ((type < NVE4_HW_SM_QUERY(0) || type > NVE4_HW_SM_QUERY_LAST) &&
|
||||
|
|
@ -1216,7 +1216,7 @@ nvc0_hw_sm_get_driver_query_info(struct nvc0_screen *screen, unsigned id,
|
|||
{
|
||||
int count = 0;
|
||||
|
||||
if (screen->base.device->drm_version >= 0x01000101) {
|
||||
if (screen->base.drm->version >= 0x01000101) {
|
||||
if (screen->compute) {
|
||||
if (screen->base.class_3d == NVE4_3D_CLASS) {
|
||||
count += NVE4_HW_SM_QUERY_COUNT;
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ nvc0_screen_create(struct nouveau_device *dev)
|
|||
screen->base.base.is_video_format_supported = nouveau_vp3_screen_video_supported;
|
||||
|
||||
flags = NOUVEAU_BO_GART | NOUVEAU_BO_MAP;
|
||||
if (dev->drm_version >= 0x01000202)
|
||||
if (screen->base.drm->version >= 0x01000202)
|
||||
flags |= NOUVEAU_BO_COHERENT;
|
||||
|
||||
ret = nouveau_bo_new(dev, flags, 0, 4096, NULL, &screen->fence.bo);
|
||||
|
|
@ -812,10 +812,11 @@ nvc0_screen_create(struct nouveau_device *dev)
|
|||
PUSH_DATA (push, 0x17);
|
||||
}
|
||||
|
||||
IMMED_NVC0(push, NVC0_3D(ZETA_COMP_ENABLE), dev->drm_version >= 0x01000101);
|
||||
IMMED_NVC0(push, NVC0_3D(ZETA_COMP_ENABLE),
|
||||
screen->base.drm->version >= 0x01000101);
|
||||
BEGIN_NVC0(push, NVC0_3D(RT_COMP_ENABLE(0)), 8);
|
||||
for (i = 0; i < 8; ++i)
|
||||
PUSH_DATA(push, dev->drm_version >= 0x01000101);
|
||||
PUSH_DATA(push, screen->base.drm->version >= 0x01000101);
|
||||
|
||||
BEGIN_NVC0(push, NVC0_3D(RT_CONTROL), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
|
|
@ -911,7 +912,7 @@ nvc0_screen_create(struct nouveau_device *dev)
|
|||
PUSH_DATAh(push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
PUSH_DATA (push, screen->uniform_bo->offset + (5 << 16) + (6 << 9));
|
||||
|
||||
if (dev->drm_version >= 0x01000101) {
|
||||
if (screen->base.drm->version >= 0x01000101) {
|
||||
ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_GRAPH_UNITS, &value);
|
||||
if (ret) {
|
||||
NOUVEAU_ERR("NOUVEAU_GETPARAM_GRAPH_UNITS failed.\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue