From: Lucas Stach <dev@lynxeye.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: fix PLL sharing on DCE6.1
Date: Thu, 05 May 2016 19:12:22 +0200 [thread overview]
Message-ID: <1462468342.2498.1.camel@lynxeye.de> (raw)
In-Reply-To: <CADnq5_O2fYn7Z7KYRJZDcS3xo+Y-ENM4O+ZyriFLUnD3SHbERw@mail.gmail.com>
Am Donnerstag, den 05.05.2016, 10:22 -0400 schrieb Alex Deucher:
> On Thu, May 5, 2016 at 5:02 AM, Lucas Stach <dev@lynxeye.de> wrote:
> >
> > On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should
> > not
> > be taken into consideration when looking for an already enabled PLL
> > to be shared with other outputs.
> >
> > This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my
> > Richland
> > based laptop, where the internal display is connected to UNIPHYA
> > through
> > a TRAVIS DP->LVDS bridge.
> >
> > Bug:
> > https://bugs.freedesktop.org/show_bug.cgi?id=78987
> >
> > Signed-off-by: Lucas Stach <dev@lynxeye.de>
> Nice catch. Need to add a check for the non-dp case as well I think.
> How about the attached patch?
>
This one looks good to me.
Thanks,
Lucas
> Alex
>
> >
> > ---
> > drivers/gpu/drm/radeon/atombios_crtc.c | 13 +++++++++----
> > 1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c
> > b/drivers/gpu/drm/radeon/atombios_crtc.c
> > index b80b08f..401bcbd 100644
> > --- a/drivers/gpu/drm/radeon/atombios_crtc.c
> > +++ b/drivers/gpu/drm/radeon/atombios_crtc.c
> > @@ -1739,7 +1739,8 @@ static u32 radeon_get_pll_use_mask(struct
> > drm_crtc *crtc)
> > * also in DP mode. For DP, a single PPLL can be used for all DP
> > * crtcs/encoders.
> > */
> > -static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
> > +static int radeon_get_shared_dp_ppll(struct radeon_device *rdev,
> > + struct drm_crtc *crtc)
> > {
> > struct drm_device *dev = crtc->dev;
> > struct drm_crtc *test_crtc;
> > @@ -1751,6 +1752,10 @@ static int radeon_get_shared_dp_ppll(struct
> > drm_crtc *crtc)
> > test_radeon_crtc = to_radeon_crtc(test_crtc);
> > if (test_radeon_crtc->encoder &&
> > ENCODER_MODE_IS_DP(atombios_get_encoder_mode(te
> > st_radeon_crtc->encoder))) {
> > + /* PPLL2 is exclusive to UNIPHYA on DCE61
> > */
> > + if (ASIC_IS_DCE61(rdev) &&
> > !ASIC_IS_DCE8(rdev) &&
> > + test_radeon_crtc->pll_id == ATOM_PPLL2)
> > + continue;
> > /* for DP use the same PLL for all */
> > if (test_radeon_crtc->pll_id !=
> > ATOM_PPLL_INVALID)
> > return test_radeon_crtc->pll_id;
> > @@ -1859,7 +1864,7 @@ static int radeon_atom_pick_pll(struct
> > drm_crtc *crtc)
> > return ATOM_PPLL_INVALID;
> > else {
> > /* use the same PPLL for all DP
> > monitors */
> > - pll =
> > radeon_get_shared_dp_ppll(crtc);
> > + pll =
> > radeon_get_shared_dp_ppll(rdev, crtc);
> > if (pll != ATOM_PPLL_INVALID)
> > return pll;
> > }
> > @@ -1907,7 +1912,7 @@ static int radeon_atom_pick_pll(struct
> > drm_crtc *crtc)
> > return ATOM_PPLL_INVALID;
> > else {
> > /* use the same PPLL for all DP
> > monitors */
> > - pll =
> > radeon_get_shared_dp_ppll(crtc);
> > + pll =
> > radeon_get_shared_dp_ppll(rdev, crtc);
> > if (pll != ATOM_PPLL_INVALID)
> > return pll;
> > }
> > @@ -1962,7 +1967,7 @@ static int radeon_atom_pick_pll(struct
> > drm_crtc *crtc)
> > return ATOM_DCPLL;
> > else {
> > /* use the same PPLL for all DP
> > monitors */
> > - pll =
> > radeon_get_shared_dp_ppll(crtc);
> > + pll =
> > radeon_get_shared_dp_ppll(rdev, crtc);
> > if (pll != ATOM_PPLL_INVALID)
> > return pll;
> > }
> > --
> > 2.5.5
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-05-05 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 9:02 [PATCH] drm/radeon: fix PLL sharing on DCE6.1 Lucas Stach
2016-05-05 14:22 ` Alex Deucher
2016-05-05 17:12 ` Lucas Stach [this message]
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=1462468342.2498.1.camel@lynxeye.de \
--to=dev@lynxeye.de \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.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