File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
drivers/gpu/drm/nouveau/core Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -104,11 +104,8 @@ nouveau_subdev_create_(struct nouveau_object *parent,
104
104
105
105
if (parent ) {
106
106
struct nouveau_device * device = nv_device (parent );
107
- int subidx = nv_hclass (subdev ) & 0xff ;
108
-
109
107
subdev -> debug = nouveau_dbgopt (device -> dbgopt , subname );
110
108
subdev -> mmio = nv_subdev (device )-> mmio ;
111
- device -> subdev [subidx ] = * pobject ;
112
109
}
113
110
114
111
return 0 ;
Original file line number Diff line number Diff line change @@ -268,6 +268,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
268
268
if (ret )
269
269
return ret ;
270
270
271
+ device -> subdev [i ] = devobj -> subdev [i ];
272
+
271
273
/* note: can't init *any* subdevs until devinit has been run
272
274
* due to not knowing exactly what the vbios init tables will
273
275
* mess with. devinit also can't be run until all of its
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ struct nouveau_fb {
75
75
static inline struct nouveau_fb *
76
76
nouveau_fb (void * obj )
77
77
{
78
+ /* fbram uses this before device subdev pointer is valid */
79
+ if (nv_iclass (obj , NV_SUBDEV_CLASS ) &&
80
+ nv_subidx (obj ) == NVDEV_SUBDEV_FB )
81
+ return obj ;
82
+
78
83
return (void * )nv_device (obj )-> subdev [NVDEV_SUBDEV_FB ];
79
84
}
80
85
You can’t perform that action at this time.
0 commit comments