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

Commit 2f666bcf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: pll tweaks for r7xx
  drm/nouveau: fix allocation of notifier object
  drm/nouveau: fix notifier memory corruption bug
  drm/nouveau: fix pinning of notifier block
  drm/nouveau: populate ttm_alloced with false, when it's not
  drm/nouveau: fix nv30 pcie boards
  drm/nouveau: split ramin_lock into two locks, one hardirq safe
  drm/radeon/kms: adjust evergreen display watermark setup
  drm/radeon/kms: add connectors even if i2c fails
  drm/radeon/kms: fix bad shift in atom iio table parser
parents 6cf54437 5785e53f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -83,7 +83,7 @@ nouveau_dma_init(struct nouveau_channel *chan)
		return ret;
		return ret;


	/* NV_MEMORY_TO_MEMORY_FORMAT requires a notifier object */
	/* NV_MEMORY_TO_MEMORY_FORMAT requires a notifier object */
	ret = nouveau_notifier_alloc(chan, NvNotify0, 32, 0xfd0, 0x1000,
	ret = nouveau_notifier_alloc(chan, NvNotify0, 32, 0xfe0, 0x1000,
				     &chan->m2mf_ntfy);
				     &chan->m2mf_ntfy);
	if (ret)
	if (ret)
		return ret;
		return ret;
+3 −0
Original line number Original line Diff line number Diff line
@@ -682,6 +682,9 @@ struct drm_nouveau_private {
	/* For PFIFO and PGRAPH. */
	/* For PFIFO and PGRAPH. */
	spinlock_t context_switch_lock;
	spinlock_t context_switch_lock;


	/* VM/PRAMIN flush, legacy PRAMIN aperture */
	spinlock_t vm_lock;

	/* RAMIN configuration, RAMFC, RAMHT and RAMRO offsets */
	/* RAMIN configuration, RAMFC, RAMHT and RAMRO offsets */
	struct nouveau_ramht  *ramht;
	struct nouveau_ramht  *ramht;
	struct nouveau_gpuobj *ramfc;
	struct nouveau_gpuobj *ramfc;
+2 −2
Original line number Original line Diff line number Diff line
@@ -181,13 +181,13 @@ nouveau_fbcon_sync(struct fb_info *info)
		OUT_RING  (chan, 0);
		OUT_RING  (chan, 0);
	}
	}


	nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy + 3, 0xffffffff);
	nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy/4 + 3, 0xffffffff);
	FIRE_RING(chan);
	FIRE_RING(chan);
	mutex_unlock(&chan->mutex);
	mutex_unlock(&chan->mutex);


	ret = -EBUSY;
	ret = -EBUSY;
	for (i = 0; i < 100000; i++) {
	for (i = 0; i < 100000; i++) {
		if (!nouveau_bo_rd32(chan->notifier_bo, chan->m2mf_ntfy + 3)) {
		if (!nouveau_bo_rd32(chan->notifier_bo, chan->m2mf_ntfy/4 + 3)) {
			ret = 0;
			ret = 0;
			break;
			break;
		}
		}
+1 −1
Original line number Original line Diff line number Diff line
@@ -398,7 +398,7 @@ nouveau_mem_vram_init(struct drm_device *dev)
			dma_bits = 40;
			dma_bits = 40;
	} else
	} else
	if (drm_pci_device_is_pcie(dev) &&
	if (drm_pci_device_is_pcie(dev) &&
	    dev_priv->chipset != 0x40 &&
	    dev_priv->chipset  > 0x40 &&
	    dev_priv->chipset != 0x45) {
	    dev_priv->chipset != 0x45) {
		if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39)))
		if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39)))
			dma_bits = 39;
			dma_bits = 39;
+7 −4
Original line number Original line Diff line number Diff line
@@ -35,19 +35,22 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
{
{
	struct drm_device *dev = chan->dev;
	struct drm_device *dev = chan->dev;
	struct nouveau_bo *ntfy = NULL;
	struct nouveau_bo *ntfy = NULL;
	uint32_t flags;
	uint32_t flags, ttmpl;
	int ret;
	int ret;


	if (nouveau_vram_notify)
	if (nouveau_vram_notify) {
		flags = NOUVEAU_GEM_DOMAIN_VRAM;
		flags = NOUVEAU_GEM_DOMAIN_VRAM;
	else
		ttmpl = TTM_PL_FLAG_VRAM;
	} else {
		flags = NOUVEAU_GEM_DOMAIN_GART;
		flags = NOUVEAU_GEM_DOMAIN_GART;
		ttmpl = TTM_PL_FLAG_TT;
	}


	ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy);
	ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy);
	if (ret)
	if (ret)
		return ret;
		return ret;


	ret = nouveau_bo_pin(ntfy, flags);
	ret = nouveau_bo_pin(ntfy, ttmpl);
	if (ret)
	if (ret)
		goto out_err;
		goto out_err;


Loading