From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Christian_K=F6nig?= Subject: Re: [PATCH 1/3] drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume Date: Fri, 30 Aug 2013 08:49:36 +0200 Message-ID: <52204080.8060705@vodafone.de> References: <1377811490-4649-1-git-send-email-alexander.deucher@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from smtp-02.vodafone.de (mxout.vodafone.de [80.84.1.40]) by gabe.freedesktop.org (Postfix) with ESMTP id C9DAEE6745 for ; Thu, 29 Aug 2013 23:57:12 -0700 (PDT) In-Reply-To: <1377811490-4649-1-git-send-email-alexander.deucher@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: Alex Deucher , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Am 29.08.2013 23:24, schrieb Alex Deucher: > For powergating, we just need to re-init the registers, there > is no need to resture the uvd BOs. This just adds needless > work when powergating uvd for playback while the system is > on. We only need to restore the uvd BOs on an actual resume > from suspend or when the driver loads. > > Signed-off-by: Alex Deucher We probably should mention somewhere that this patchset fixes multiple = stream playback on Kabini, apart from that the patches are: Reviewed-by: Christian K=F6nig > --- > drivers/gpu/drm/radeon/cik.c | 13 ++++++++----- > drivers/gpu/drm/radeon/uvd_v4_2.c | 5 ----- > 2 files changed, 8 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c > index e336a31..79124f8 100644 > --- a/drivers/gpu/drm/radeon/cik.c > +++ b/drivers/gpu/drm/radeon/cik.c > @@ -7051,12 +7051,15 @@ static int cik_startup(struct radeon_device *rdev) > return r; > } > = > - r =3D uvd_v4_2_resume(rdev); > + r =3D radeon_uvd_resume(rdev); > if (!r) { > - r =3D radeon_fence_driver_start_ring(rdev, > - R600_RING_TYPE_UVD_INDEX); > - if (r) > - dev_err(rdev->dev, "UVD fences init error (%d).\n", r); > + r =3D uvd_v4_2_resume(rdev); > + if (!r) { > + r =3D radeon_fence_driver_start_ring(rdev, > + R600_RING_TYPE_UVD_INDEX); > + if (r) > + dev_err(rdev->dev, "UVD fences init error (%d).\n", r); > + } > } > if (r) > rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size =3D 0; > diff --git a/drivers/gpu/drm/radeon/uvd_v4_2.c b/drivers/gpu/drm/radeon/u= vd_v4_2.c > index d7e4807..d04d507 100644 > --- a/drivers/gpu/drm/radeon/uvd_v4_2.c > +++ b/drivers/gpu/drm/radeon/uvd_v4_2.c > @@ -39,11 +39,6 @@ int uvd_v4_2_resume(struct radeon_device *rdev) > { > uint64_t addr; > uint32_t size; > - int r; > - > - r =3D radeon_uvd_resume(rdev); > - if (r) > - return r; > = > /* programm the VCPU memory controller bits 0-27 */ > addr =3D rdev->uvd.gpu_addr >> 3;