On Thu, Feb 6, 2020 at 1:00 PM Tawfik, Aly <[email protected]> wrote: > > > ***Reattached patch with corrections*** > > From b828a2b3df3057461dfceb4d1394fe858ced9d03 Mon Sep 17 00:00:00 2001 > From: Ali-Tawfik <[email protected]> > Date: Thu, 6 Feb 2020 12:53:02 -0500 > Subject: [PATCH] drm/amdgpu: [DALI] Dali Variant Detection > > Problem Description: > > Currently we are checking internal fused rev id with pci rev id. However, > fused internal rev id is the same on all raven2 parts (in which Dali was > based on too), thus Dali detection fails > > Fix: > > To detect this chip we need to use pci rev id but it is not defined in the > scope of DC. To workaround this issue alter the fused > rev id using pcie id for all dali chips before DC init, > then use the internal fused id for chip detection in DC. > > Signed-off-by: Ali-Tawfik <[email protected]>
Reviewed-by: Alex Deucher <[email protected]> Once it's reviewed, feel free to commit it. Alex > --- > drivers/gpu/drm/amd/amdgpu/soc15.c | 9 ++++++++- > drivers/gpu/drm/amd/display/include/dal_asic_id.h | 4 ++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c > b/drivers/gpu/drm/amd/amdgpu/soc15.c > index 317803f6a561..f85c27fbe64c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/soc15.c > +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c > @@ -1094,8 +1094,15 @@ static int soc15_common_early_init(void *handle) > break; > case CHIP_RAVEN: > adev->asic_funcs = &soc15_asic_funcs; > - if (adev->rev_id >= 0x8) > + if (adev->rev_id >= 0x8) { > + if ((adev->pdev->device == 0x15d8) && > + ((adev->pdev->revision == 0xCF) || > + (adev->pdev->revision == 0xE3)|| > + (adev->pdev->revision == 0xE4))) { > + adev->rev_id = 0x10; > + } > adev->external_rev_id = adev->rev_id + 0x79; > + } > else if (adev->pdev->device == 0x15d8) > adev->external_rev_id = adev->rev_id + 0x41; > else if (adev->rev_id == 1) > diff --git a/drivers/gpu/drm/amd/display/include/dal_asic_id.h > b/drivers/gpu/drm/amd/display/include/dal_asic_id.h > index a2903985b9e8..0329f26bfacd 100644 > --- a/drivers/gpu/drm/amd/display/include/dal_asic_id.h > +++ b/drivers/gpu/drm/amd/display/include/dal_asic_id.h > @@ -143,6 +143,7 @@ > #define RAVEN2_15D8_REV_EB 0xEB > #define RAVEN1_F0 0xF0 > #define RAVEN_UNKNOWN 0xFF > +#define RAVEN2_15D8_B0_LW 0x89 > #ifndef ASICREV_IS_RAVEN > #define ASICREV_IS_RAVEN(eChipRev) ((eChipRev >= RAVEN_A0) && eChipRev < > RAVEN_UNKNOWN) > #endif > @@ -152,8 +153,7 @@ > #define ASICREV_IS_RAVEN2(eChipRev) ((eChipRev >= RAVEN2_A0) && (eChipRev < > RAVEN1_F0)) > #endif > #define ASICREV_IS_RV1_F0(eChipRev) ((eChipRev >= RAVEN1_F0) && (eChipRev < > RAVEN_UNKNOWN)) > -#define ASICREV_IS_DALI(eChipRev) ((eChipRev == RAVEN2_15D8_REV_E3) \ > - || (eChipRev == RAVEN2_15D8_REV_E4)) > +#define ASICREV_IS_DALI(eChipRev) ((eChipRev == RAVEN2_15D8_B0_LW)) > #define ASICREV_IS_POLLOCK(eChipRev) (eChipRev == RAVEN2_15D8_REV_94 \ > || eChipRev == RAVEN2_15D8_REV_95 \ > || eChipRev == RAVEN2_15D8_REV_E9 \ > -- > 2.17.1 > > _______________________________________________ > amd-gfx mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
