Skip to content

Commit

Permalink
drm/radeon: add a vce flag to know if need to initialize vce or not.
Browse files Browse the repository at this point in the history
This will later on serve for module option to disable vce.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Jérome Glisse authored and Alex Deucher committed May 2, 2016
1 parent bc48a15 commit e3ebfcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/radeon/radeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -2423,6 +2423,7 @@ struct radeon_device {
int num_crtc; /* number of crtcs */
struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
bool has_uvd;
bool has_vce;
struct r600_audio audio; /* audio stuff */
struct notifier_block acpi_nb;
/* only one userspace can use Hyperz features or CMASK at a time */
Expand Down
11 changes: 9 additions & 2 deletions drivers/gpu/drm/radeon/radeon_asic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,7 @@ int radeon_asic_init(struct radeon_device *rdev)
rdev->num_crtc = 2;

rdev->has_uvd = false;
rdev->has_vce = false;

switch (rdev->family) {
case CHIP_R100:
Expand Down Expand Up @@ -2454,6 +2455,7 @@ int radeon_asic_init(struct radeon_device *rdev)
/* set num crtcs */
rdev->num_crtc = 4;
rdev->has_uvd = true;
rdev->has_vce = true;
rdev->cg_flags =
RADEON_CG_SUPPORT_VCE_MGCG;
break;
Expand All @@ -2470,10 +2472,13 @@ int radeon_asic_init(struct radeon_device *rdev)
rdev->num_crtc = 2;
else
rdev->num_crtc = 6;
if (rdev->family == CHIP_HAINAN)
if (rdev->family == CHIP_HAINAN) {
rdev->has_uvd = false;
else
rdev->has_vce = false;
} else {
rdev->has_uvd = true;
rdev->has_vce = true;
}
switch (rdev->family) {
case CHIP_TAHITI:
rdev->cg_flags =
Expand Down Expand Up @@ -2578,6 +2583,7 @@ int radeon_asic_init(struct radeon_device *rdev)
rdev->asic = &ci_asic;
rdev->num_crtc = 6;
rdev->has_uvd = true;
rdev->has_vce = true;
if (rdev->family == CHIP_BONAIRE) {
rdev->cg_flags =
RADEON_CG_SUPPORT_GFX_MGCG |
Expand Down Expand Up @@ -2678,6 +2684,7 @@ int radeon_asic_init(struct radeon_device *rdev)
RADEON_PG_SUPPORT_SAMU;*/
}
rdev->has_uvd = true;
rdev->has_vce = true;
break;
default:
/* FIXME: not supported yet */
Expand Down

0 comments on commit e3ebfcf

Please sign in to comment.