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

Commit 9e9a928e 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:
 "All fairly small: radeon stability and a panic path fix.

  Mostly radeon fixes, suspend/resume fix, stability on the CIK
  chipsets, along with a locking check avoidance patch for panic times
  regression"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: use the CP DMA on CIK
  drm/radeon: sync page table updates
  drm/radeon: fix vm buffer size estimation
  drm/crtc-helper: skip locking checks in panicking path
  drm/radeon/dpm: resume fixes for some systems
parents d2cfd310 0a4ae727
Loading
Loading
Loading
Loading
+15 −2
Original line number Original line Diff line number Diff line
@@ -29,6 +29,7 @@
 *      Jesse Barnes <jesse.barnes@intel.com>
 *      Jesse Barnes <jesse.barnes@intel.com>
 */
 */


#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/export.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>


@@ -88,7 +89,13 @@ bool drm_helper_encoder_in_use(struct drm_encoder *encoder)
	struct drm_connector *connector;
	struct drm_connector *connector;
	struct drm_device *dev = encoder->dev;
	struct drm_device *dev = encoder->dev;


	/*
	 * We can expect this mutex to be locked if we are not panicking.
	 * Locking is currently fubar in the panic handler.
	 */
	if (!oops_in_progress)
		WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
		WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));

	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
		if (connector->encoder == encoder)
		if (connector->encoder == encoder)
			return true;
			return true;
@@ -112,7 +119,13 @@ bool drm_helper_crtc_in_use(struct drm_crtc *crtc)
	struct drm_encoder *encoder;
	struct drm_encoder *encoder;
	struct drm_device *dev = crtc->dev;
	struct drm_device *dev = crtc->dev;


	/*
	 * We can expect this mutex to be locked if we are not panicking.
	 * Locking is currently fubar in the panic handler.
	 */
	if (!oops_in_progress)
		WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
		WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));

	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
		if (encoder->crtc == crtc && drm_helper_encoder_in_use(encoder))
		if (encoder->crtc == crtc && drm_helper_encoder_in_use(encoder))
			return true;
			return true;
+2 −4
Original line number Original line Diff line number Diff line
@@ -270,8 +270,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
	switch (mode) {
	switch (mode) {
	case DRM_MODE_DPMS_ON:
	case DRM_MODE_DPMS_ON:
		radeon_crtc->enabled = true;
		radeon_crtc->enabled = true;
		/* adjust pm to dpms changes BEFORE enabling crtcs */
		radeon_pm_compute_clocks(rdev);
		atombios_enable_crtc(crtc, ATOM_ENABLE);
		atombios_enable_crtc(crtc, ATOM_ENABLE);
		if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev))
		if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev))
			atombios_enable_crtc_memreq(crtc, ATOM_ENABLE);
			atombios_enable_crtc_memreq(crtc, ATOM_ENABLE);
@@ -289,10 +287,10 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
			atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
			atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
		atombios_enable_crtc(crtc, ATOM_DISABLE);
		atombios_enable_crtc(crtc, ATOM_DISABLE);
		radeon_crtc->enabled = false;
		radeon_crtc->enabled = false;
		/* adjust pm to dpms changes AFTER disabling crtcs */
		radeon_pm_compute_clocks(rdev);
		break;
		break;
	}
	}
	/* adjust pm to dpms */
	radeon_pm_compute_clocks(rdev);
}
}


static void
static void
+2 −2
Original line number Original line Diff line number Diff line
@@ -2049,8 +2049,8 @@ static struct radeon_asic ci_asic = {
		.blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
		.blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
		.dma = &cik_copy_dma,
		.dma = &cik_copy_dma,
		.dma_ring_index = R600_RING_TYPE_DMA_INDEX,
		.dma_ring_index = R600_RING_TYPE_DMA_INDEX,
		.copy = &cik_copy_dma,
		.copy = &cik_copy_cpdma,
		.copy_ring_index = R600_RING_TYPE_DMA_INDEX,
		.copy_ring_index = RADEON_RING_TYPE_GFX_INDEX,
	},
	},
	.surface = {
	.surface = {
		.set_reg = r600_set_surface_reg,
		.set_reg = r600_set_surface_reg,
+4 −0
Original line number Original line Diff line number Diff line
@@ -1558,6 +1558,10 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon)


	drm_kms_helper_poll_enable(dev);
	drm_kms_helper_poll_enable(dev);


	/* set the power state here in case we are a PX system or headless */
	if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled)
		radeon_pm_compute_clocks(rdev);

	if (fbcon) {
	if (fbcon) {
		radeon_fbdev_set_suspend(rdev, 0);
		radeon_fbdev_set_suspend(rdev, 0);
		console_unlock();
		console_unlock();
+0 −1
Original line number Original line Diff line number Diff line
@@ -1104,7 +1104,6 @@ static void radeon_pm_resume_dpm(struct radeon_device *rdev)
	if (ret)
	if (ret)
		goto dpm_resume_fail;
		goto dpm_resume_fail;
	rdev->pm.dpm_enabled = true;
	rdev->pm.dpm_enabled = true;
	radeon_pm_compute_clocks(rdev);
	return;
	return;


dpm_resume_fail:
dpm_resume_fail:
Loading