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

Commit 1660a76a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-for-v4.16-rc6' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "i915, amd and nouveau fixes.

  i915:
   - backlight fix for some panels
   - pm fix
   - fencing fix
   - some GVT fixes

  amdgpu:
   - backlight fix across suspend/resume
   - object destruction ordering issue fix
   - displayport fix

  nouveau:
   - two backlight fixes
   - fix for some lockups

  Pretty quiet week, seems like everyone was fixing backlights"

* tag 'drm-fixes-for-v4.16-rc6' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/bl: fix backlight regression
  drm/nouveau/bl: Fix oops on driver unbind
  drm/nouveau/mmu: ALIGN_DOWN correct variable
  drm/i915/gvt: fix user copy warning by whitelist workload rb_tail field
  drm/i915/gvt: Correct the privilege shadow batch buffer address
  drm/amdgpu/dce: Don't turn off DP sink when disconnected
  drm/amdgpu: save/restore backlight level in legacy dce code
  drm/radeon: fix prime teardown order
  drm/amdgpu: fix prime teardown order
  drm/i915: Kick the rps worker when changing the boost frequency
  drm/i915: Only prune fences after wait-for-all
  drm/i915: Enable VBT based BL control for DP
  drm/i915/gvt: keep oa config in shadow ctx
  drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio
parents df09348f 3a1b5de3
Loading
Loading
Loading
Loading
+12 −19
Original line number Original line Diff line number Diff line
@@ -69,26 +69,19 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)
		/* don't do anything if sink is not display port, i.e.,
		/* don't do anything if sink is not display port, i.e.,
		 * passive dp->(dvi|hdmi) adaptor
		 * passive dp->(dvi|hdmi) adaptor
		 */
		 */
		if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
		if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT &&
			int saved_dpms = connector->dpms;
		    amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd) &&
			/* Only turn off the display if it's physically disconnected */
		    amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) {
			if (!amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd)) {
			/* Don't start link training before we have the DPCD */
				drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
			} else if (amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) {
				/* Don't try to start link training before we
				 * have the dpcd */
			if (amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
			if (amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
				return;
				return;


				/* set it to OFF so that drm_helper_connector_dpms()
			/* Turn the connector off and back on immediately, which
				 * won't return immediately since the current state
			 * will trigger link training
				 * is ON at this point.
			 */
			 */
				connector->dpms = DRM_MODE_DPMS_OFF;
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
		}
		}
			connector->dpms = saved_dpms;
		}
	}
	}
}
}


+0 −2
Original line number Original line Diff line number Diff line
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)
	struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj);
	struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj);


	if (robj) {
	if (robj) {
		if (robj->gem_base.import_attach)
			drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg);
		amdgpu_mn_unregister(robj);
		amdgpu_mn_unregister(robj);
		amdgpu_bo_unref(&robj);
		amdgpu_bo_unref(&robj);
	}
	}
+1 −0
Original line number Original line Diff line number Diff line
@@ -352,6 +352,7 @@ struct amdgpu_mode_info {
	u16 firmware_flags;
	u16 firmware_flags;
	/* pointer to backlight encoder */
	/* pointer to backlight encoder */
	struct amdgpu_encoder *bl_encoder;
	struct amdgpu_encoder *bl_encoder;
	u8 bl_level; /* saved backlight level */
	struct amdgpu_audio	audio; /* audio stuff */
	struct amdgpu_audio	audio; /* audio stuff */
	int			num_crtc; /* number of crtcs */
	int			num_crtc; /* number of crtcs */
	int			num_hpd; /* number of hpd pins */
	int			num_hpd; /* number of hpd pins */
+2 −0
Original line number Original line Diff line number Diff line
@@ -56,6 +56,8 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)


	amdgpu_bo_kunmap(bo);
	amdgpu_bo_kunmap(bo);


	if (bo->gem_base.import_attach)
		drm_prime_gem_destroy(&bo->gem_base, bo->tbo.sg);
	drm_gem_object_release(&bo->gem_base);
	drm_gem_object_release(&bo->gem_base);
	amdgpu_bo_unref(&bo->parent);
	amdgpu_bo_unref(&bo->parent);
	if (!list_empty(&bo->shadow_list)) {
	if (!list_empty(&bo->shadow_list)) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@
#include <linux/backlight.h>
#include <linux/backlight.h>
#include "bif/bif_4_1_d.h"
#include "bif/bif_4_1_d.h"


static u8
u8
amdgpu_atombios_encoder_get_backlight_level_from_reg(struct amdgpu_device *adev)
amdgpu_atombios_encoder_get_backlight_level_from_reg(struct amdgpu_device *adev)
{
{
	u8 backlight_level;
	u8 backlight_level;
@@ -48,7 +48,7 @@ amdgpu_atombios_encoder_get_backlight_level_from_reg(struct amdgpu_device *adev)
	return backlight_level;
	return backlight_level;
}
}


static void
void
amdgpu_atombios_encoder_set_backlight_level_to_reg(struct amdgpu_device *adev,
amdgpu_atombios_encoder_set_backlight_level_to_reg(struct amdgpu_device *adev,
					    u8 backlight_level)
					    u8 backlight_level)
{
{
Loading