mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 22:16:39 +07:00
drm/nouveau/core: can now assume client/device object tree based on object.engine
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
bdda4703f1
commit
8000fb2191
@ -64,11 +64,13 @@ nv_printk_(struct nouveau_object *object, int level, const char *fmt, ...)
|
||||
struct nouveau_object *subdev;
|
||||
char obuf[64], *ofmt = "";
|
||||
|
||||
subdev = object;
|
||||
while (subdev && !nv_iclass(subdev, NV_SUBDEV_CLASS))
|
||||
subdev = subdev->parent;
|
||||
if (!subdev)
|
||||
if (object->engine == NULL) {
|
||||
subdev = object;
|
||||
while (subdev && !nv_iclass(subdev, NV_SUBDEV_CLASS))
|
||||
subdev = subdev->parent;
|
||||
} else {
|
||||
subdev = object->engine;
|
||||
}
|
||||
|
||||
device = subdev;
|
||||
if (device->parent)
|
||||
|
@ -512,9 +512,10 @@ struct nouveau_device *
|
||||
nv_device(void *obj)
|
||||
{
|
||||
struct nouveau_object *device = nv_object(obj);
|
||||
while (device && device->parent)
|
||||
device = device->parent;
|
||||
if (!nv_iclass(device, NV_ENGINE_CLASS)) {
|
||||
if (device->engine == NULL) {
|
||||
while (device && device->parent)
|
||||
device = device->parent;
|
||||
} else {
|
||||
device = nv_object(obj)->engine;
|
||||
if (device && device->parent)
|
||||
device = device->parent;
|
||||
|
Loading…
Reference in New Issue
Block a user