Message ID | 1394057024-10597-1-git-send-email-alexander.deucher@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 05.03.2014 23:03, schrieb Alex Deucher: > When selecting the engine, return an error if the GPU > doesn't have UVD. Why exactly is that needed? If UVD isn't present the ring should be active, so we should fail the same way just a little bit later. Additional to that userspace should check before submitting a job if UVD is available or not. Christian. > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> > Cc: stable@vger.kernel.org > --- > drivers/gpu/drm/radeon/radeon_cs.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c > index dfb5a1d..fa7839b 100644 > --- a/drivers/gpu/drm/radeon/radeon_cs.c > +++ b/drivers/gpu/drm/radeon/radeon_cs.c > @@ -145,7 +145,10 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority > } > break; > case RADEON_CS_RING_UVD: > - p->ring = R600_RING_TYPE_UVD_INDEX; > + if (p->rdev->has_uvd) > + p->ring = R600_RING_TYPE_UVD_INDEX; > + else > + return -EINVAL; > break; > } > return 0;
> -----Original Message----- > From: Christian König [mailto:deathsimple@vodafone.de] > Sent: Thursday, March 06, 2014 3:56 AM > To: Alex Deucher; dri-devel@lists.freedesktop.org > Cc: Deucher, Alexander; stable@vger.kernel.org > Subject: Re: [PATCH] drm/radeon/cs: return an error if no uvd support > > Am 05.03.2014 23:03, schrieb Alex Deucher: > > When selecting the engine, return an error if the GPU > > doesn't have UVD. > > Why exactly is that needed? If UVD isn't present the ring should be > active, so we should fail the same way just a little bit later. > Additional to that userspace should check before submitting a job if UVD > is available or not. It's just an additional check. It's not required. Alex > > Christian. > > > > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> > > Cc: stable@vger.kernel.org > > --- > > drivers/gpu/drm/radeon/radeon_cs.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/radeon/radeon_cs.c > b/drivers/gpu/drm/radeon/radeon_cs.c > > index dfb5a1d..fa7839b 100644 > > --- a/drivers/gpu/drm/radeon/radeon_cs.c > > +++ b/drivers/gpu/drm/radeon/radeon_cs.c > > @@ -145,7 +145,10 @@ static int radeon_cs_get_ring(struct > radeon_cs_parser *p, u32 ring, s32 priority > > } > > break; > > case RADEON_CS_RING_UVD: > > - p->ring = R600_RING_TYPE_UVD_INDEX; > > + if (p->rdev->has_uvd) > > + p->ring = R600_RING_TYPE_UVD_INDEX; > > + else > > + return -EINVAL; > > break; > > } > > return 0; >
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index dfb5a1d..fa7839b 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c @@ -145,7 +145,10 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority } break; case RADEON_CS_RING_UVD: - p->ring = R600_RING_TYPE_UVD_INDEX; + if (p->rdev->has_uvd) + p->ring = R600_RING_TYPE_UVD_INDEX; + else + return -EINVAL; break; } return 0;
When selecting the engine, return an error if the GPU doesn't have UVD. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/radeon_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)