Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 211b0cdc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Three nouveau fixes, all user visible issues, and one radeon
  regression fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: enforce use of radeon_get_ib_value when reading user cmd
  drm/nouveau: add lockdep annotations
  drm/nv50/fb: Fix nullptr-deref on IGPs
  drm/nouveau: use different register to wait for secret scrubber
parents 836dc9e3 de0babd6
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -73,8 +73,11 @@ _nouveau_falcon_init(struct nouveau_object *object)
	nv_debug(falcon, "data limit: %d\n", falcon->data.limit);
	nv_debug(falcon, "data limit: %d\n", falcon->data.limit);


	/* wait for 'uc halted' to be signalled before continuing */
	/* wait for 'uc halted' to be signalled before continuing */
	if (falcon->secret) {
	if (falcon->secret && falcon->version < 4) {
		if (!falcon->version)
			nv_wait(falcon, 0x008, 0x00000010, 0x00000010);
			nv_wait(falcon, 0x008, 0x00000010, 0x00000010);
		else
			nv_wait(falcon, 0x180, 0x80000000, 0);
		nv_wo32(falcon, 0x004, 0x00000010);
		nv_wo32(falcon, 0x004, 0x00000010);
	}
	}


+1 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ nouveau_subdev_create_(struct nouveau_object *parent,
	if (ret)
	if (ret)
		return ret;
		return ret;


	mutex_init(&subdev->mutex);
	__mutex_init(&subdev->mutex, subname, &oclass->lock_class_key);
	subdev->name = subname;
	subdev->name = subname;


	if (parent) {
	if (parent) {
+5 −2
Original line number Original line Diff line number Diff line
@@ -50,10 +50,13 @@ int nouveau_object_fini(struct nouveau_object *, bool suspend);


extern struct nouveau_ofuncs nouveau_object_ofuncs;
extern struct nouveau_ofuncs nouveau_object_ofuncs;


/* Don't allocate dynamically, because lockdep needs lock_class_keys to be in
 * ".data". */
struct nouveau_oclass {
struct nouveau_oclass {
	u32 handle;
	u32 handle;
	struct nouveau_ofuncs *ofuncs;
	struct nouveau_ofuncs * const ofuncs;
	struct nouveau_omthds *omthds;
	struct nouveau_omthds * const omthds;
	struct lock_class_key lock_class_key;
};
};


#define nv_oclass(o)    nv_object(o)->oclass
#define nv_oclass(o)    nv_object(o)->oclass
+2 −2
Original line number Original line Diff line number Diff line
@@ -86,8 +86,8 @@ nouveau_fb_preinit(struct nouveau_fb *pfb)
			return ret;
			return ret;
	}
	}


	if (!nouveau_mm_initialised(&pfb->tags) && tags) {
	if (!nouveau_mm_initialised(&pfb->tags)) {
		ret = nouveau_mm_init(&pfb->tags, 0, ++tags, 1);
		ret = nouveau_mm_init(&pfb->tags, 0, tags ? ++tags : 0, 1);
		if (ret)
		if (ret)
			return ret;
			return ret;
	}
	}
+3 −2
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ nv50_fb_vram_init(struct nouveau_fb *pfb)
	struct nouveau_bios *bios = nouveau_bios(device);
	struct nouveau_bios *bios = nouveau_bios(device);
	const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */
	const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */
	const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */
	const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */
	u32 size;
	u32 size, tags = 0;
	int ret;
	int ret;


	pfb->ram.size = nv_rd32(pfb, 0x10020c);
	pfb->ram.size = nv_rd32(pfb, 0x10020c);
@@ -140,10 +140,11 @@ nv50_fb_vram_init(struct nouveau_fb *pfb)
			return ret;
			return ret;


		pfb->ram.ranks = (nv_rd32(pfb, 0x100200) & 0x4) ? 2 : 1;
		pfb->ram.ranks = (nv_rd32(pfb, 0x100200) & 0x4) ? 2 : 1;
		tags = nv_rd32(pfb, 0x100320);
		break;
		break;
	}
	}


	return nv_rd32(pfb, 0x100320);
	return tags;
}
}


static int
static int
Loading