[PATCH] drm/amdgpu: properly guard DC support in navi code

Alex Deucher alexdeucher at gmail.com
Mon Jul 8 15:47:36 UTC 2019


On Mon, Jul 8, 2019 at 8:56 AM Kazlauskas, Nicholas
<Nicholas.Kazlauskas at amd.com> wrote:
>
> On 7/8/19 5:15 AM, Michel Dänzer wrote:
> > On 2019-07-05 10:41 p.m., Alex Deucher wrote:
> >> Need to add appropriate ifdef.
> >>
> >> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
> >>   1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> >> index a090e3fdc762..ee39cb740d41 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> >> @@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
> >>                      amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
> >>              if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
> >>                      amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
> >> +#if defined(CONFIG_DRM_AMD_DC)
> >>              else if (amdgpu_device_has_dc_support(adev))
> >>                      amdgpu_device_ip_block_add(adev, &dm_ip_block);
> >> +#else
> >> +#   warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
> >> +#endif
> >>              amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
> >>              amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
> >>              if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
> >>
> >
> > Is CONFIG_DRM_AMD_DC still needed? What for? (Other than accidentally
> > disabling display with current hardware ;)
> >
> >
>
> It would slim down module size and compile times if you just needed
> Radeon and nothing else, but it's kind of a niche use case.
>
> I think the only thing it does right now is autoselect DCN based on
> whether we think we have FP support or not, but that could probably be
> moved elsewhere.

Can I get an ack or RB on this?  We can decide what to do about the
option later.

Alex

>
> Nicholas Kazlauskas


More information about the amd-gfx mailing list