From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>, stable@vger.kernel.org
Subject: [PATCH 1/4] drm/radeon: move watermark setup out of set base callback
Date: Mon, 19 Aug 2013 13:11:44 -0400 [thread overview]
Message-ID: <1376932307-18453-1-git-send-email-alexander.deucher@amd.com> (raw)
Some of the watermark registers need to be programmed prior
to enabling the display. Doing this in the set base callback
means the watermark registers can be updated at arbitray times
when the display offset is changed which can lead to display
problems.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/atombios_crtc.c | 13 +++++++------
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index b9d3b43..dd11e00 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1278,9 +1278,6 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
radeon_bo_unreserve(rbo);
}
- /* Bytes per pixel may have changed */
- radeon_bandwidth_update(rdev);
-
return 0;
}
@@ -1447,9 +1444,6 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
radeon_bo_unreserve(rbo);
}
- /* Bytes per pixel may have changed */
- radeon_bandwidth_update(rdev);
-
return 0;
}
@@ -1897,6 +1891,11 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc)
static void atombios_crtc_commit(struct drm_crtc *crtc)
{
+ struct drm_device *dev = crtc->dev;
+ struct radeon_device *rdev = dev->dev_private;
+
+ /* set up watermarks before enabling the display */
+ radeon_bandwidth_update(rdev);
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
atombios_lock_crtc(crtc, ATOM_DISABLE);
}
@@ -1910,6 +1909,8 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
int i;
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
+ /* set up watermarks when the display is off */
+ radeon_bandwidth_update(rdev);
if (ASIC_IS_DCE6(rdev))
atombios_powergate_crtc(crtc, ATOM_ENABLE);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index 7cb178a..dbc5b773 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -537,9 +537,6 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,
radeon_bo_unreserve(rbo);
}
- /* Bytes per pixel may have changed */
- radeon_bandwidth_update(rdev);
-
return 0;
}
@@ -1045,8 +1042,11 @@ static void radeon_crtc_prepare(struct drm_crtc *crtc)
static void radeon_crtc_commit(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
+ struct radeon_device *rdev = dev->dev_private;
struct drm_crtc *crtci;
+ /* set up watermarks before enabling the display */
+ radeon_bandwidth_update(rdev);
/*
* Reenable the CRTCs that should be running.
*/
--
1.8.3.1
next reply other threads:[~2013-08-19 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 17:11 Alex Deucher [this message]
2013-08-19 17:11 ` [PATCH 2/4] drm/radeon: update line buffer allocation for dce4.1/5 Alex Deucher
2013-08-19 17:11 ` [PATCH 3/4] drm/radeon: update line buffer allocation for dce6 Alex Deucher
2013-08-19 17:11 ` [PATCH 4/4] drm/radeon: update line buffer allocation for dce8 Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376932307-18453-1-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox