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

Commit e1a7eb08 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:
 "Mainly nouveau fixes, one for a regressions in -rc1, fixes for booting
  on a ppc G5, and a Kconfig fix.  Two radeon fixes, one oops, one s/r
  fix.  One udl mmap fix.  And one core drm fix to stop bad fbdev apps
  overwriting bits of ram."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm: Validate requested virtual size against allocated fb size
  drm/radeon: Don't dereference possibly-NULL pointer.
  mm, drm/udl: fixup vma flags on mmap
  drm/radeon/kms: fix fans after resume
  nouveau/bios: Fix tracking of BIOS image data
  nouveau: Fix crash when pci_ram_rom() returns a size of 0
  drm/nouveau: select POWER_SUPPLY
  drm/nouveau: inform userspace of relaxed kernel subchannel requirements
  Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"
  drm/nouveau: oops, create m2mf for nvd9 too
parents 464662b9 62fb376e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -559,9 +559,13 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
		return -EINVAL;

	/* Need to resize the fb object !!! */
	if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width || var->yres > fb->height) {
	if (var->bits_per_pixel > fb->bits_per_pixel ||
	    var->xres > fb->width || var->yres > fb->height ||
	    var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
		DRM_DEBUG("fb userspace requested width/height/bpp is greater than current fb "
			  "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, var->bits_per_pixel,
			  "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n",
			  var->xres, var->yres, var->bits_per_pixel,
			  var->xres_virtual, var->yres_virtual,
			  fb->width, fb->height, fb->bits_per_pixel);
		return -EINVAL;
	}
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ config DRM_NOUVEAU
	select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT
	select ACPI_WMI if ACPI
	select MXM_WMI if ACPI
	select POWER_SUPPLY
	help
	  Choose this option for open-source nVidia support.

+6 −3
Original line number Diff line number Diff line
@@ -177,14 +177,15 @@ bios_shadow_pci(struct nvbios *bios)

	if (!pci_enable_rom(pdev)) {
		void __iomem *rom = pci_map_rom(pdev, &length);
		if (rom) {
		if (rom && length) {
			bios->data = kmalloc(length, GFP_KERNEL);
			if (bios->data) {
				memcpy_fromio(bios->data, rom, length);
				bios->length = length;
			}
			pci_unmap_rom(pdev, rom);
		}
		if (rom)
			pci_unmap_rom(pdev, rom);

		pci_disable_rom(pdev);
	}
@@ -272,6 +273,7 @@ bios_shadow(struct drm_device *dev)
		mthd->score = score_vbios(bios, mthd->rw);
		mthd->size = bios->length;
		mthd->data = bios->data;
		bios->data = NULL;
	} while (mthd->score != 3 && (++mthd)->shadow);

	mthd = shadow_methods;
@@ -280,7 +282,8 @@ bios_shadow(struct drm_device *dev)
		if (mthd->score > best->score) {
			kfree(best->data);
			best = mthd;
		}
		} else
			kfree(mthd->data);
	} while ((++mthd)->shadow);

	if (best->score) {
+5 −5
Original line number Diff line number Diff line
@@ -436,11 +436,11 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
	}

	if (dev_priv->card_type < NV_C0) {
		init->subchan[0].handle = NvSw;
		init->subchan[0].grclass = NV_SW;
		init->nr_subchan = 1;
	} else {
		init->nr_subchan = 0;
		init->subchan[0].handle = 0x00000000;
		init->subchan[0].grclass = 0x0000;
		init->subchan[1].handle = NvSw;
		init->subchan[1].grclass = NV_SW;
		init->nr_subchan = 2;
	}

	/* Named memory object area */
+2 −2
Original line number Diff line number Diff line
@@ -48,8 +48,8 @@ void nv50_dma_push(struct nouveau_channel *, struct nouveau_bo *,

/* Hardcoded object assignments to subchannels (subchannel id). */
enum {
	NvSubSw		= 0,
	NvSubM2MF	= 1,
	NvSubM2MF	= 0,
	NvSubSw		= 1,
	NvSub2D		= 2,
	NvSubCtxSurf2D  = 2,
	NvSubGdiRect    = 3,
Loading