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

Commit 12267166 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:
 "Nothing too astounding or major: radeon, i915, vmwgfx, armada and
  exynos.

  Biggest ones:
   - vmwgfx has one big locking regression fix
   - i915 has come displayport fixes
   - radeon has some stability and a memory alloc failure
   - armada and exynos have some vblank fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits)
  drm/exynos: correct connector->dpms field before resuming
  drm/exynos: enable vblank after DPMS on
  drm/exynos: init kms poll at the end of initialization
  drm/exynos: propagate plane initialization errors
  drm/exynos: vidi: fix build warning
  drm/exynos: remove explicit encoder/connector de-initialization
  drm/exynos: init vblank with real number of crtcs
  drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
  drm/vmwgfx: Fix hash key computation
  drm/vmwgfx: fix lock breakage
  drm/i915/dp: only use training pattern 3 on platforms that support it
  drm/radeon: remove some buggy dead code
  drm/i915: Ignore VBT backlight check on Macbook 2, 1
  drm/radeon: remove invalid pci id
  drm/radeon: dpm fixes for asrock systems
  radeon: clean up coding style differences in radeon_get_bios()
  drm/radeon: Use drm_malloc_ab instead of kmalloc_array
  drm/radeon/dpm: disable ulv support on SI
  drm/i915: Fix GMBUSFREQ on vlv/chv
  drm/i915: Ignore long hpds on eDP ports
  ...
parents 3c43de0f 66338fee
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ static void armada_drm_vblank_off(struct armada_crtc *dcrtc)
	 * Tell the DRM core that vblank IRQs aren't going to happen for
	 * a while.  This cleans up any pending vblank events for us.
	 */
	drm_vblank_off(dev, dcrtc->num);
	drm_crtc_vblank_off(&dcrtc->crtc);

	/* Handle any pending flip event. */
	spin_lock_irq(&dev->event_lock);
@@ -289,6 +289,8 @@ static void armada_drm_crtc_dpms(struct drm_crtc *crtc, int dpms)
		armada_drm_crtc_update(dcrtc);
		if (dpms_blanked(dpms))
			armada_drm_vblank_off(dcrtc);
		else
			drm_crtc_vblank_on(&dcrtc->crtc);
	}
}

@@ -526,7 +528,7 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
	/* Wait for pending flips to complete */
	wait_event(dcrtc->frame_wait, !dcrtc->frame_work);

	drm_vblank_pre_modeset(crtc->dev, dcrtc->num);
	drm_crtc_vblank_off(crtc);

	crtc->mode = *adj;

@@ -617,7 +619,7 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,

	armada_drm_crtc_update(dcrtc);

	drm_vblank_post_modeset(crtc->dev, dcrtc->num);
	drm_crtc_vblank_on(crtc);
	armada_drm_crtc_finish_fb(dcrtc, old_fb, dpms_blanked(dcrtc->dpms));

	return 0;
@@ -945,18 +947,15 @@ static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
	armada_reg_queue_end(work->regs, i);

	/*
	 * Hold the old framebuffer for the work - DRM appears to drop our
	 * reference to the old framebuffer in drm_mode_page_flip_ioctl().
	 * Ensure that we hold a reference on the new framebuffer.
	 * This has to match the behaviour in mode_set.
	 */
	drm_framebuffer_reference(work->old_fb);
	drm_framebuffer_reference(fb);

	ret = armada_drm_crtc_queue_frame_work(dcrtc, work);
	if (ret) {
		/*
		 * Undo our reference above; DRM does not drop the reference
		 * to this object on error, so that's okay.
		 */
		drm_framebuffer_unreference(work->old_fb);
		/* Undo our reference above */
		drm_framebuffer_unreference(fb);
		kfree(work);
		return ret;
	}
+2 −1
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags)
	if (ret)
		goto err_comp;

	dev->irq_enabled = true;
	dev->vblank_disable_allowed = 1;

	ret = armada_fbdev_init(dev);
@@ -331,7 +332,7 @@ static struct drm_driver armada_drm_driver = {
	.desc			= "Armada SoC DRM",
	.date			= "20120730",
	.driver_features	= DRIVER_GEM | DRIVER_MODESET |
				  DRIVER_PRIME,
				  DRIVER_HAVE_IRQ | DRIVER_PRIME,
	.ioctls			= armada_ioctls,
	.fops			= &armada_drm_fops,
};
+0 −5
Original line number Diff line number Diff line
@@ -1355,13 +1355,8 @@ static void exynos_dp_unbind(struct device *dev, struct device *master,
				void *data)
{
	struct exynos_drm_display *display = dev_get_drvdata(dev);
	struct exynos_dp_device *dp = display->ctx;
	struct drm_encoder *encoder = dp->encoder;

	exynos_dp_dpms(display, DRM_MODE_DPMS_OFF);

	exynos_dp_connector_destroy(&dp->connector);
	encoder->funcs->destroy(encoder);
}

static const struct component_ops exynos_dp_ops = {
+4 −1
Original line number Diff line number Diff line
@@ -71,13 +71,16 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
				!atomic_read(&exynos_crtc->pending_flip),
				HZ/20))
			atomic_set(&exynos_crtc->pending_flip, 0);
		drm_vblank_off(crtc->dev, exynos_crtc->pipe);
		drm_crtc_vblank_off(crtc);
	}

	if (manager->ops->dpms)
		manager->ops->dpms(manager, mode);

	exynos_crtc->dpms = mode;

	if (mode == DRM_MODE_DPMS_ON)
		drm_crtc_vblank_on(crtc);
}

static void exynos_drm_crtc_prepare(struct drm_crtc *crtc)
+0 −4
Original line number Diff line number Diff line
@@ -338,14 +338,10 @@ struct exynos_drm_display *exynos_dpi_probe(struct device *dev)

int exynos_dpi_remove(struct device *dev)
{
	struct drm_encoder *encoder = exynos_dpi_display.encoder;
	struct exynos_dpi *ctx = exynos_dpi_display.ctx;

	exynos_dpi_dpms(&exynos_dpi_display, DRM_MODE_DPMS_OFF);

	exynos_dpi_connector_destroy(&ctx->connector);
	encoder->funcs->destroy(encoder);

	if (ctx->panel)
		drm_panel_detach(ctx->panel);

Loading