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

Commit 24b36da3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms/blit: fix blit copy for very large buffers
  drm/radeon/kms: fix TRAVIS panel setup
  drm/radeon: fix use after free in ATRM bios reading code.
  drm/radeon/kms: Fix device tree linkage of DP i2c buses too
  drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height.
  drm/radeon/kms: disable output polling when suspended
  drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
  drm/nouveau/gem: fix fence_sync race / oops
  drm/nouveau: fix typo on mxmdcb option
  drm/nouveau/mxm: pretend to succeed, even if we can't shadow the MXM-SIS
  drm/nouveau/disp: check that panel power gpio is enabled at init time
parents c84e295b 52b53a0b
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -54,9 +54,10 @@ struct bit_entry {
int bit_table(struct drm_device *, u8 id, struct bit_entry *);
int bit_table(struct drm_device *, u8 id, struct bit_entry *);


enum dcb_gpio_tag {
enum dcb_gpio_tag {
	DCB_GPIO_TVDAC0 = 0xc,
	DCB_GPIO_PANEL_POWER = 0x01,
	DCB_GPIO_TVDAC0 = 0x0c,
	DCB_GPIO_TVDAC1 = 0x2d,
	DCB_GPIO_TVDAC1 = 0x2d,
	DCB_GPIO_PWM_FAN = 0x9,
	DCB_GPIO_PWM_FAN = 0x09,
	DCB_GPIO_FAN_SENSE = 0x3d,
	DCB_GPIO_FAN_SENSE = 0x3d,
	DCB_GPIO_UNUSED = 0xff
	DCB_GPIO_UNUSED = 0xff
};
};
+10 −0
Original line number Original line Diff line number Diff line
@@ -219,6 +219,16 @@ nouveau_display_init(struct drm_device *dev)
	if (ret)
	if (ret)
		return ret;
		return ret;


	/* power on internal panel if it's not already.  the init tables of
	 * some vbios default this to off for some reason, causing the
	 * panel to not work after resume
	 */
	if (nouveau_gpio_func_get(dev, DCB_GPIO_PANEL_POWER) == 0) {
		nouveau_gpio_func_set(dev, DCB_GPIO_PANEL_POWER, true);
		msleep(300);
	}

	/* enable polling for external displays */
	drm_kms_helper_poll_enable(dev);
	drm_kms_helper_poll_enable(dev);


	/* enable hotplug interrupts */
	/* enable hotplug interrupts */
+1 −1
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ MODULE_PARM_DESC(ctxfw, "Use external HUB/GPC ucode (fermi)\n");
int nouveau_ctxfw;
int nouveau_ctxfw;
module_param_named(ctxfw, nouveau_ctxfw, int, 0400);
module_param_named(ctxfw, nouveau_ctxfw, int, 0400);


MODULE_PARM_DESC(ctxfw, "Santise DCB table according to MXM-SIS\n");
MODULE_PARM_DESC(mxmdcb, "Santise DCB table according to MXM-SIS\n");
int nouveau_mxmdcb = 1;
int nouveau_mxmdcb = 1;
module_param_named(mxmdcb, nouveau_mxmdcb, int, 0400);
module_param_named(mxmdcb, nouveau_mxmdcb, int, 0400);


+21 −2
Original line number Original line Diff line number Diff line
@@ -379,6 +379,25 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
	return 0;
	return 0;
}
}


static int
validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo)
{
	struct nouveau_fence *fence = NULL;
	int ret = 0;

	spin_lock(&nvbo->bo.bdev->fence_lock);
	if (nvbo->bo.sync_obj)
		fence = nouveau_fence_ref(nvbo->bo.sync_obj);
	spin_unlock(&nvbo->bo.bdev->fence_lock);

	if (fence) {
		ret = nouveau_fence_sync(fence, chan);
		nouveau_fence_unref(&fence);
	}

	return ret;
}

static int
static int
validate_list(struct nouveau_channel *chan, struct list_head *list,
validate_list(struct nouveau_channel *chan, struct list_head *list,
	      struct drm_nouveau_gem_pushbuf_bo *pbbo, uint64_t user_pbbo_ptr)
	      struct drm_nouveau_gem_pushbuf_bo *pbbo, uint64_t user_pbbo_ptr)
@@ -393,7 +412,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
	list_for_each_entry(nvbo, list, entry) {
	list_for_each_entry(nvbo, list, entry) {
		struct drm_nouveau_gem_pushbuf_bo *b = &pbbo[nvbo->pbbo_index];
		struct drm_nouveau_gem_pushbuf_bo *b = &pbbo[nvbo->pbbo_index];


		ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan);
		ret = validate_sync(chan, nvbo);
		if (unlikely(ret)) {
		if (unlikely(ret)) {
			NV_ERROR(dev, "fail pre-validate sync\n");
			NV_ERROR(dev, "fail pre-validate sync\n");
			return ret;
			return ret;
@@ -416,7 +435,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
			return ret;
			return ret;
		}
		}


		ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan);
		ret = validate_sync(chan, nvbo);
		if (unlikely(ret)) {
		if (unlikely(ret)) {
			NV_ERROR(dev, "fail post-validate sync\n");
			NV_ERROR(dev, "fail post-validate sync\n");
			return ret;
			return ret;
+9 −0
Original line number Original line Diff line number Diff line
@@ -656,7 +656,16 @@ nouveau_mxm_init(struct drm_device *dev)


	if (mxm_shadow(dev, mxm[0])) {
	if (mxm_shadow(dev, mxm[0])) {
		MXM_MSG(dev, "failed to locate valid SIS\n");
		MXM_MSG(dev, "failed to locate valid SIS\n");
#if 0
		/* we should, perhaps, fall back to some kind of limited
		 * mode here if the x86 vbios hasn't already done the
		 * work for us (so we prevent loading with completely
		 * whacked vbios tables).
		 */
		return -EINVAL;
		return -EINVAL;
#else
		return 0;
#endif
	}
	}


	MXM_MSG(dev, "MXMS Version %d.%d\n",
	MXM_MSG(dev, "MXMS Version %d.%d\n",
Loading