Commit b5304a4f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'drm-fixes-2021-05-14' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Not much here, mostly amdgpu fixes, with a couple of radeon, and a
  cosmetic vc4.

  Two MAINTAINERS file updates also.

  amdgpu:
   - Fixes for flexible array conversions
   - Fix sysfs attribute init
   - Harvesting fixes
   - VCN CG/PG fixes for Picasso

  radeon:
   - Fixes for flexible array conversions
   - Fix for flickering on Oland with multiple 4K displays

  vc4:
   - drop unused function"

* tag 'drm-fixes-2021-05-14' of git://anongit.freedesktop.org/drm/drm:
  drm/amdgpu: update vcn1.0 Non-DPG suspend sequence
  drm/amdgpu: set vcn mgcg flag for picasso
  drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected
  drm/amdgpu: update the method for harvest IP for specific SKU
  drm/amdgpu: add judgement when add ip blocks (v2)
  drm/amd/display: Initialize attribute for hdcp_srm sysfs file
  drm/amd/pm: Fix out-of-bounds bug
  drm/radeon/si_dpm: Fix SMU power state load
  drm/radeon/ni_dpm: Fix booting bug
  MAINTAINERS: Update address for Emma Anholt
  MAINTAINERS: Update my e-mail
  drm/vc4: remove unused function
  drm/ttm: Do not add non-system domain BO into swap list
parents 315d9931 08f0cfbf
...@@ -160,6 +160,7 @@ Jeff Layton <jlayton@kernel.org> <jlayton@primarydata.com> ...@@ -160,6 +160,7 @@ Jeff Layton <jlayton@kernel.org> <jlayton@primarydata.com>
Jeff Layton <jlayton@kernel.org> <jlayton@redhat.com> Jeff Layton <jlayton@kernel.org> <jlayton@redhat.com>
Jens Axboe <axboe@suse.de> Jens Axboe <axboe@suse.de>
Jens Osterkamp <Jens.Osterkamp@de.ibm.com> Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
Jiri Slaby <jirislaby@kernel.org> <jirislaby@gmail.com> Jiri Slaby <jirislaby@kernel.org> <jirislaby@gmail.com>
Jiri Slaby <jirislaby@kernel.org> <jslaby@novell.com> Jiri Slaby <jirislaby@kernel.org> <jslaby@novell.com>
Jiri Slaby <jirislaby@kernel.org> <jslaby@suse.com> Jiri Slaby <jirislaby@kernel.org> <jslaby@suse.com>
......
...@@ -1578,7 +1578,7 @@ F: drivers/clk/sunxi/ ...@@ -1578,7 +1578,7 @@ F: drivers/clk/sunxi/
ARM/Allwinner sunXi SoC support ARM/Allwinner sunXi SoC support
M: Maxime Ripard <mripard@kernel.org> M: Maxime Ripard <mripard@kernel.org>
M: Chen-Yu Tsai <wens@csie.org> M: Chen-Yu Tsai <wens@csie.org>
R: Jernej Skrabec <jernej.skrabec@siol.net> R: Jernej Skrabec <jernej.skrabec@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
...@@ -5089,7 +5089,7 @@ S: Maintained ...@@ -5089,7 +5089,7 @@ S: Maintained
F: drivers/net/fddi/defza.* F: drivers/net/fddi/defza.*
DEINTERLACE DRIVERS FOR ALLWINNER H3 DEINTERLACE DRIVERS FOR ALLWINNER H3
M: Jernej Skrabec <jernej.skrabec@siol.net> M: Jernej Skrabec <jernej.skrabec@gmail.com>
L: linux-media@vger.kernel.org L: linux-media@vger.kernel.org
S: Maintained S: Maintained
T: git git://linuxtv.org/media_tree.git T: git git://linuxtv.org/media_tree.git
...@@ -5632,14 +5632,14 @@ F: include/linux/power/smartreflex.h ...@@ -5632,14 +5632,14 @@ F: include/linux/power/smartreflex.h
DRM DRIVER FOR ALLWINNER DE2 AND DE3 ENGINE DRM DRIVER FOR ALLWINNER DE2 AND DE3 ENGINE
M: Maxime Ripard <mripard@kernel.org> M: Maxime Ripard <mripard@kernel.org>
M: Chen-Yu Tsai <wens@csie.org> M: Chen-Yu Tsai <wens@csie.org>
R: Jernej Skrabec <jernej.skrabec@siol.net> R: Jernej Skrabec <jernej.skrabec@gmail.com>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Supported S: Supported
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
F: drivers/gpu/drm/sun4i/sun8i* F: drivers/gpu/drm/sun4i/sun8i*
DRM DRIVER FOR ARM PL111 CLCD DRM DRIVER FOR ARM PL111 CLCD
M: Eric Anholt <eric@anholt.net> M: Emma Anholt <emma@anholt.net>
S: Supported S: Supported
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
F: drivers/gpu/drm/pl111/ F: drivers/gpu/drm/pl111/
...@@ -5719,7 +5719,7 @@ T: git git://anongit.freedesktop.org/drm/drm-misc ...@@ -5719,7 +5719,7 @@ T: git git://anongit.freedesktop.org/drm/drm-misc
F: drivers/gpu/drm/tiny/gm12u320.c F: drivers/gpu/drm/tiny/gm12u320.c
DRM DRIVER FOR HX8357D PANELS DRM DRIVER FOR HX8357D PANELS
M: Eric Anholt <eric@anholt.net> M: Emma Anholt <emma@anholt.net>
S: Maintained S: Maintained
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
F: Documentation/devicetree/bindings/display/himax,hx8357d.txt F: Documentation/devicetree/bindings/display/himax,hx8357d.txt
...@@ -6023,7 +6023,7 @@ M: Neil Armstrong <narmstrong@baylibre.com> ...@@ -6023,7 +6023,7 @@ M: Neil Armstrong <narmstrong@baylibre.com>
M: Robert Foss <robert.foss@linaro.org> M: Robert Foss <robert.foss@linaro.org>
R: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> R: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
R: Jonas Karlman <jonas@kwiboo.se> R: Jonas Karlman <jonas@kwiboo.se>
R: Jernej Skrabec <jernej.skrabec@siol.net> R: Jernej Skrabec <jernej.skrabec@gmail.com>
S: Maintained S: Maintained
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
F: drivers/gpu/drm/bridge/ F: drivers/gpu/drm/bridge/
...@@ -6177,7 +6177,7 @@ F: Documentation/devicetree/bindings/display/ti/ ...@@ -6177,7 +6177,7 @@ F: Documentation/devicetree/bindings/display/ti/
F: drivers/gpu/drm/omapdrm/ F: drivers/gpu/drm/omapdrm/
DRM DRIVERS FOR V3D DRM DRIVERS FOR V3D
M: Eric Anholt <eric@anholt.net> M: Emma Anholt <emma@anholt.net>
S: Supported S: Supported
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
...@@ -6185,7 +6185,7 @@ F: drivers/gpu/drm/v3d/ ...@@ -6185,7 +6185,7 @@ F: drivers/gpu/drm/v3d/
F: include/uapi/drm/v3d_drm.h F: include/uapi/drm/v3d_drm.h
DRM DRIVERS FOR VC4 DRM DRIVERS FOR VC4
M: Eric Anholt <eric@anholt.net> M: Emma Anholt <emma@anholt.net>
M: Maxime Ripard <mripard@kernel.org> M: Maxime Ripard <mripard@kernel.org>
S: Supported S: Supported
T: git git://github.com/anholt/linux T: git git://github.com/anholt/linux
...@@ -15815,7 +15815,7 @@ F: include/uapi/linux/rose.h ...@@ -15815,7 +15815,7 @@ F: include/uapi/linux/rose.h
F: net/rose/ F: net/rose/
ROTATION DRIVER FOR ALLWINNER A83T ROTATION DRIVER FOR ALLWINNER A83T
M: Jernej Skrabec <jernej.skrabec@siol.net> M: Jernej Skrabec <jernej.skrabec@gmail.com>
L: linux-media@vger.kernel.org L: linux-media@vger.kernel.org
S: Maintained S: Maintained
T: git git://linuxtv.org/media_tree.git T: git git://linuxtv.org/media_tree.git
......
...@@ -1006,6 +1006,7 @@ struct amdgpu_device { ...@@ -1006,6 +1006,7 @@ struct amdgpu_device {
struct amdgpu_df df; struct amdgpu_df df;
struct amdgpu_ip_block ip_blocks[AMDGPU_MAX_IP_NUM]; struct amdgpu_ip_block ip_blocks[AMDGPU_MAX_IP_NUM];
uint32_t harvest_ip_mask;
int num_ip_blocks; int num_ip_blocks;
struct mutex mn_lock; struct mutex mn_lock;
DECLARE_HASHTABLE(mn_hash, 7); DECLARE_HASHTABLE(mn_hash, 7);
......
...@@ -1683,6 +1683,19 @@ int amdgpu_device_ip_block_add(struct amdgpu_device *adev, ...@@ -1683,6 +1683,19 @@ int amdgpu_device_ip_block_add(struct amdgpu_device *adev,
if (!ip_block_version) if (!ip_block_version)
return -EINVAL; return -EINVAL;
switch (ip_block_version->type) {
case AMD_IP_BLOCK_TYPE_VCN:
if (adev->harvest_ip_mask & AMD_HARVEST_IP_VCN_MASK)
return 0;
break;
case AMD_IP_BLOCK_TYPE_JPEG:
if (adev->harvest_ip_mask & AMD_HARVEST_IP_JPEG_MASK)
return 0;
break;
default:
break;
}
DRM_INFO("add ip block number %d <%s>\n", adev->num_ip_blocks, DRM_INFO("add ip block number %d <%s>\n", adev->num_ip_blocks,
ip_block_version->funcs->name); ip_block_version->funcs->name);
...@@ -3111,7 +3124,6 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev) ...@@ -3111,7 +3124,6 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
return amdgpu_device_asic_has_dc_support(adev->asic_type); return amdgpu_device_asic_has_dc_support(adev->asic_type);
} }
static void amdgpu_device_xgmi_reset_func(struct work_struct *__work) static void amdgpu_device_xgmi_reset_func(struct work_struct *__work)
{ {
struct amdgpu_device *adev = struct amdgpu_device *adev =
...@@ -3276,6 +3288,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -3276,6 +3288,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
adev->vm_manager.vm_pte_funcs = NULL; adev->vm_manager.vm_pte_funcs = NULL;
adev->vm_manager.vm_pte_num_scheds = 0; adev->vm_manager.vm_pte_num_scheds = 0;
adev->gmc.gmc_funcs = NULL; adev->gmc.gmc_funcs = NULL;
adev->harvest_ip_mask = 0x0;
adev->fence_context = dma_fence_context_alloc(AMDGPU_MAX_RINGS); adev->fence_context = dma_fence_context_alloc(AMDGPU_MAX_RINGS);
bitmap_zero(adev->gfx.pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES); bitmap_zero(adev->gfx.pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
......
...@@ -373,6 +373,34 @@ int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id, ...@@ -373,6 +373,34 @@ int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id,
return -EINVAL; return -EINVAL;
} }
void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev)
{
struct binary_header *bhdr;
struct harvest_table *harvest_info;
int i;
bhdr = (struct binary_header *)adev->mman.discovery_bin;
harvest_info = (struct harvest_table *)(adev->mman.discovery_bin +
le16_to_cpu(bhdr->table_list[HARVEST_INFO].offset));
for (i = 0; i < 32; i++) {
if (le32_to_cpu(harvest_info->list[i].hw_id) == 0)
break;
switch (le32_to_cpu(harvest_info->list[i].hw_id)) {
case VCN_HWID:
adev->harvest_ip_mask |= AMD_HARVEST_IP_VCN_MASK;
adev->harvest_ip_mask |= AMD_HARVEST_IP_JPEG_MASK;
break;
case DMU_HWID:
adev->harvest_ip_mask |= AMD_HARVEST_IP_DMU_MASK;
break;
default:
break;
}
}
}
int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev) int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
{ {
struct binary_header *bhdr; struct binary_header *bhdr;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
void amdgpu_discovery_fini(struct amdgpu_device *adev); void amdgpu_discovery_fini(struct amdgpu_device *adev);
int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev); int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev);
void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev);
int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id, int amdgpu_discovery_get_ip_version(struct amdgpu_device *adev, int hw_id,
int *major, int *minor, int *revision); int *major, int *minor, int *revision);
int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev); int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev);
......
...@@ -623,6 +623,16 @@ static const struct amdgpu_ip_block_version nv_common_ip_block = ...@@ -623,6 +623,16 @@ static const struct amdgpu_ip_block_version nv_common_ip_block =
.funcs = &nv_common_ip_funcs, .funcs = &nv_common_ip_funcs,
}; };
static bool nv_is_headless_sku(struct pci_dev *pdev)
{
if ((pdev->device == 0x731E &&
(pdev->revision == 0xC6 || pdev->revision == 0xC7)) ||
(pdev->device == 0x7340 && pdev->revision == 0xC9) ||
(pdev->device == 0x7360 && pdev->revision == 0xC7))
return true;
return false;
}
static int nv_reg_base_init(struct amdgpu_device *adev) static int nv_reg_base_init(struct amdgpu_device *adev)
{ {
int r; int r;
...@@ -635,6 +645,12 @@ static int nv_reg_base_init(struct amdgpu_device *adev) ...@@ -635,6 +645,12 @@ static int nv_reg_base_init(struct amdgpu_device *adev)
goto legacy_init; goto legacy_init;
} }
amdgpu_discovery_harvest_ip(adev);
if (nv_is_headless_sku(adev->pdev)) {
adev->harvest_ip_mask |= AMD_HARVEST_IP_VCN_MASK;
adev->harvest_ip_mask |= AMD_HARVEST_IP_JPEG_MASK;
}
return 0; return 0;
} }
...@@ -671,16 +687,6 @@ void nv_set_virt_ops(struct amdgpu_device *adev) ...@@ -671,16 +687,6 @@ void nv_set_virt_ops(struct amdgpu_device *adev)
adev->virt.ops = &xgpu_nv_virt_ops; adev->virt.ops = &xgpu_nv_virt_ops;
} }
static bool nv_is_headless_sku(struct pci_dev *pdev)
{
if ((pdev->device == 0x731E &&
(pdev->revision == 0xC6 || pdev->revision == 0xC7)) ||
(pdev->device == 0x7340 && pdev->revision == 0xC9) ||
(pdev->device == 0x7360 && pdev->revision == 0xC7))
return true;
return false;
}
int nv_set_ip_blocks(struct amdgpu_device *adev) int nv_set_ip_blocks(struct amdgpu_device *adev)
{ {
int r; int r;
...@@ -728,8 +734,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) ...@@ -728,8 +734,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT && if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
!amdgpu_sriov_vf(adev)) !amdgpu_sriov_vf(adev))
amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block); amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
if (!nv_is_headless_sku(adev->pdev)) amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block); amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block);
if (adev->enable_mes) if (adev->enable_mes)
amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block); amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block);
...@@ -752,8 +757,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) ...@@ -752,8 +757,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT && if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
!amdgpu_sriov_vf(adev)) !amdgpu_sriov_vf(adev))
amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block); amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
if (!nv_is_headless_sku(adev->pdev)) amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
if (!amdgpu_sriov_vf(adev)) if (!amdgpu_sriov_vf(adev))
amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block); amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block);
break; break;
...@@ -777,7 +781,6 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) ...@@ -777,7 +781,6 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block); amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
if (!amdgpu_sriov_vf(adev)) if (!amdgpu_sriov_vf(adev))
amdgpu_device_ip_block_add(adev, &jpeg_v3_0_ip_block); amdgpu_device_ip_block_add(adev, &jpeg_v3_0_ip_block);
if (adev->enable_mes) if (adev->enable_mes)
amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block); amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block);
break; break;
...@@ -1149,6 +1152,11 @@ static int nv_common_early_init(void *handle) ...@@ -1149,6 +1152,11 @@ static int nv_common_early_init(void *handle)
return -EINVAL; return -EINVAL;
} }
if (adev->harvest_ip_mask & AMD_HARVEST_IP_VCN_MASK)
adev->pg_flags &= ~(AMD_PG_SUPPORT_VCN |
AMD_PG_SUPPORT_VCN_DPG |
AMD_PG_SUPPORT_JPEG);
if (amdgpu_sriov_vf(adev)) { if (amdgpu_sriov_vf(adev)) {
amdgpu_virt_init_setting(adev); amdgpu_virt_init_setting(adev);
xgpu_nv_mailbox_set_irq_funcs(adev); xgpu_nv_mailbox_set_irq_funcs(adev);
......
...@@ -1401,7 +1401,8 @@ static int soc15_common_early_init(void *handle) ...@@ -1401,7 +1401,8 @@ static int soc15_common_early_init(void *handle)
AMD_CG_SUPPORT_MC_MGCG | AMD_CG_SUPPORT_MC_MGCG |
AMD_CG_SUPPORT_MC_LS | AMD_CG_SUPPORT_MC_LS |
AMD_CG_SUPPORT_SDMA_MGCG | AMD_CG_SUPPORT_SDMA_MGCG |
AMD_CG_SUPPORT_SDMA_LS; AMD_CG_SUPPORT_SDMA_LS |
AMD_CG_SUPPORT_VCN_MGCG;
adev->pg_flags = AMD_PG_SUPPORT_SDMA | adev->pg_flags = AMD_PG_SUPPORT_SDMA |
AMD_PG_SUPPORT_MMHUB | AMD_PG_SUPPORT_MMHUB |
......
...@@ -1119,10 +1119,10 @@ static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev) ...@@ -1119,10 +1119,10 @@ static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev)
UVD_LMI_STATUS__WRITE_CLEAN_RAW_MASK; UVD_LMI_STATUS__WRITE_CLEAN_RAW_MASK;
SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_LMI_STATUS, tmp, tmp); SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_LMI_STATUS, tmp, tmp);
/* put VCPU into reset */ /* stall UMC channel */
WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_SOFT_RESET), WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_LMI_CTRL2),
UVD_SOFT_RESET__VCPU_SOFT_RESET_MASK, UVD_LMI_CTRL2__STALL_ARB_UMC_MASK,
~UVD_SOFT_RESET__VCPU_SOFT_RESET_MASK); ~UVD_LMI_CTRL2__STALL_ARB_UMC_MASK);
tmp = UVD_LMI_STATUS__UMC_READ_CLEAN_RAW_MASK | tmp = UVD_LMI_STATUS__UMC_READ_CLEAN_RAW_MASK |
UVD_LMI_STATUS__UMC_WRITE_CLEAN_RAW_MASK; UVD_LMI_STATUS__UMC_WRITE_CLEAN_RAW_MASK;
...@@ -1141,6 +1141,11 @@ static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev) ...@@ -1141,6 +1141,11 @@ static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev)
UVD_SOFT_RESET__LMI_SOFT_RESET_MASK, UVD_SOFT_RESET__LMI_SOFT_RESET_MASK,
~UVD_SOFT_RESET__LMI_SOFT_RESET_MASK); ~UVD_SOFT_RESET__LMI_SOFT_RESET_MASK);
/* put VCPU into reset */
WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_SOFT_RESET),
UVD_SOFT_RESET__VCPU_SOFT_RESET_MASK,
~UVD_SOFT_RESET__VCPU_SOFT_RESET_MASK);
WREG32_SOC15(UVD, 0, mmUVD_STATUS, 0); WREG32_SOC15(UVD, 0, mmUVD_STATUS, 0);
vcn_v1_0_enable_clock_gating(adev); vcn_v1_0_enable_clock_gating(adev);
......
...@@ -650,6 +650,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct ...@@ -650,6 +650,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct
/* File created at /sys/class/drm/card0/device/hdcp_srm*/ /* File created at /sys/class/drm/card0/device/hdcp_srm*/
hdcp_work[0].attr = data_attr; hdcp_work[0].attr = data_attr;
sysfs_bin_attr_init(&hdcp_work[0].attr);
if (sysfs_create_bin_file(&adev->dev->kobj, &hdcp_work[0].attr)) if (sysfs_create_bin_file(&adev->dev->kobj, &hdcp_work[0].attr))
DRM_WARN("Failed to create device file hdcp_srm"); DRM_WARN("Failed to create device file hdcp_srm");
......
...@@ -216,6 +216,12 @@ enum PP_FEATURE_MASK { ...@@ -216,6 +216,12 @@ enum PP_FEATURE_MASK {
PP_GFX_DCS_MASK = 0x80000, PP_GFX_DCS_MASK = 0x80000,
}; };
enum amd_harvest_ip_mask {
AMD_HARVEST_IP_VCN_MASK = 0x1,
AMD_HARVEST_IP_JPEG_MASK = 0x2,
AMD_HARVEST_IP_DMU_MASK = 0x4,
};
enum DC_FEATURE_MASK { enum DC_FEATURE_MASK {
DC_FBC_MASK = 0x1, DC_FBC_MASK = 0x1,
DC_MULTI_MON_PP_MCLK_SWITCH_MASK = 0x2, DC_MULTI_MON_PP_MCLK_SWITCH_MASK = 0x2,
......
This diff is collapsed.
...@@ -191,6 +191,14 @@ struct SISLANDS_SMC_SWSTATE ...@@ -191,6 +191,14 @@ struct SISLANDS_SMC_SWSTATE
typedef struct SISLANDS_SMC_SWSTATE SISLANDS_SMC_SWSTATE; typedef struct SISLANDS_SMC_SWSTATE SISLANDS_SMC_SWSTATE;
struct SISLANDS_SMC_SWSTATE_SINGLE {
uint8_t flags;
uint8_t levelCount;
uint8_t padding2;
uint8_t padding3;
SISLANDS_SMC_HW_PERFORMANCE_LEVEL level;
};
#define SISLANDS_SMC_VOLTAGEMASK_VDDC 0 #define SISLANDS_SMC_VOLTAGEMASK_VDDC 0
#define SISLANDS_SMC_VOLTAGEMASK_MVDD 1 #define SISLANDS_SMC_VOLTAGEMASK_MVDD 1
#define SISLANDS_SMC_VOLTAGEMASK_VDDCI 2 #define SISLANDS_SMC_VOLTAGEMASK_VDDCI 2
...@@ -208,19 +216,19 @@ typedef struct SISLANDS_SMC_VOLTAGEMASKTABLE SISLANDS_SMC_VOLTAGEMASKTABLE; ...@@ -208,19 +216,19 @@ typedef struct SISLANDS_SMC_VOLTAGEMASKTABLE SISLANDS_SMC_VOLTAGEMASKTABLE;
struct SISLANDS_SMC_STATETABLE struct SISLANDS_SMC_STATETABLE
{ {
uint8_t thermalProtectType; uint8_t thermalProtectType;
uint8_t systemFlags; uint8_t systemFlags;
uint8_t maxVDDCIndexInPPTable; uint8_t maxVDDCIndexInPPTable;
uint8_t extraFlags; uint8_t extraFlags;
uint32_t lowSMIO[SISLANDS_MAX_NO_VREG_STEPS]; uint32_t lowSMIO[SISLANDS_MAX_NO_VREG_STEPS];
SISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable; SISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable;
SISLANDS_SMC_VOLTAGEMASKTABLE phaseMaskTable; SISLANDS_SMC_VOLTAGEMASKTABLE phaseMaskTable;
PP_SIslands_DPM2Parameters dpm2Params; PP_SIslands_DPM2Parameters dpm2Params;
SISLANDS_SMC_SWSTATE initialState; struct SISLANDS_SMC_SWSTATE_SINGLE initialState;
SISLANDS_SMC_SWSTATE ACPIState; struct SISLANDS_SMC_SWSTATE_SINGLE ACPIState;
SISLANDS_SMC_SWSTATE ULVState; struct SISLANDS_SMC_SWSTATE_SINGLE ULVState;
SISLANDS_SMC_SWSTATE driverState; SISLANDS_SMC_SWSTATE driverState;
SISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1]; SISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE];
}; };
typedef struct SISLANDS_SMC_STATETABLE SISLANDS_SMC_STATETABLE; typedef struct SISLANDS_SMC_STATETABLE SISLANDS_SMC_STATETABLE;
......
This diff is collapsed.
...@@ -143,6 +143,14 @@ struct NISLANDS_SMC_SWSTATE ...@@ -143,6 +143,14 @@ struct NISLANDS_SMC_SWSTATE
typedef struct NISLANDS_SMC_SWSTATE NISLANDS_SMC_SWSTATE; typedef struct NISLANDS_SMC_SWSTATE NISLANDS_SMC_SWSTATE;
struct NISLANDS_SMC_SWSTATE_SINGLE {
uint8_t flags;
uint8_t levelCount;
uint8_t padding2;
uint8_t padding3;
NISLANDS_SMC_HW_PERFORMANCE_LEVEL level;
};
#define NISLANDS_SMC_VOLTAGEMASK_VDDC 0 #define NISLANDS_SMC_VOLTAGEMASK_VDDC 0
#define NISLANDS_SMC_VOLTAGEMASK_MVDD 1 #define NISLANDS_SMC_VOLTAGEMASK_MVDD 1
#define NISLANDS_SMC_VOLTAGEMASK_VDDCI 2 #define NISLANDS_SMC_VOLTAGEMASK_VDDCI 2
...@@ -160,19 +168,19 @@ typedef struct NISLANDS_SMC_VOLTAGEMASKTABLE NISLANDS_SMC_VOLTAGEMASKTABLE; ...@@ -160,19 +168,19 @@ typedef struct NISLANDS_SMC_VOLTAGEMASKTABLE NISLANDS_SMC_VOLTAGEMASKTABLE;
struct NISLANDS_SMC_STATETABLE struct NISLANDS_SMC_STATETABLE
{ {
uint8_t thermalProtectType; uint8_t thermalProtectType;
uint8_t systemFlags; uint8_t systemFlags;
uint8_t maxVDDCIndexInPPTable; uint8_t maxVDDCIndexInPPTable;
uint8_t extraFlags; uint8_t extraFlags;
uint8_t highSMIO[NISLANDS_MAX_NO_VREG_STEPS]; uint8_t highSMIO[NISLANDS_MAX_NO_VREG_STEPS];
uint32_t lowSMIO[NISLANDS_MAX_NO_VREG_STEPS]; uint32_t lowSMIO[NISLANDS_MAX_NO_VREG_STEPS];
NISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable; NISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable;
PP_NIslands_DPM2Parameters dpm2Params; PP_NIslands_DPM2Parameters dpm2Params;
NISLANDS_SMC_SWSTATE initialState; struct NISLANDS_SMC_SWSTATE_SINGLE initialState;
NISLANDS_SMC_SWSTATE ACPIState; struct NISLANDS_SMC_SWSTATE_SINGLE ACPIState;
NISLANDS_SMC_SWSTATE ULVState; struct NISLANDS_SMC_SWSTATE_SINGLE ULVState;
NISLANDS_SMC_SWSTATE driverState; NISLANDS_SMC_SWSTATE driverState;
NISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1]; NISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE];
}; };
typedef struct NISLANDS_SMC_STATETABLE NISLANDS_SMC_STATETABLE; typedef struct NISLANDS_SMC_STATETABLE NISLANDS_SMC_STATETABLE;
......
...@@ -1549,6 +1549,7 @@ struct radeon_dpm { ...@@ -1549,6 +1549,7 @@ struct radeon_dpm {
void *priv; void *priv;
u32 new_active_crtcs; u32 new_active_crtcs;
int new_active_crtc_count; int new_active_crtc_count;
int high_pixelclock_count;
u32 current_active_crtcs; u32 current_active_crtcs;
int current_active_crtc_count; int current_active_crtc_count;
bool single_display; bool single_display;
......
...@@ -1767,6 +1767,7 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev) ...@@ -1767,6 +1767,7 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
struct drm_device *ddev = rdev->ddev; struct drm_device *ddev = rdev->ddev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
struct radeon_crtc *radeon_crtc; struct radeon_crtc *radeon_crtc;
struct radeon_connector *radeon_connector;
if (!rdev->pm.dpm_enabled) if (!rdev->pm.dpm_enabled)
return; return;
...@@ -1776,6 +1777,7 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev) ...@@ -1776,6 +1777,7 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
/* update active crtc counts */ /* update active crtc counts */
rdev->pm.dpm.new_active_crtcs = 0; rdev->pm.dpm.new_active_crtcs = 0;
rdev->pm.dpm.new_active_crtc_count = 0; rdev->pm.dpm.new_active_crtc_count = 0;
rdev->pm.dpm.high_pixelclock_count = 0;
if (rdev->num_crtc && rdev->mode_info.mode_config_initialized) { if (rdev->num_crtc && rdev->mode_info.mode_config_initialized) {
list_for_each_entry(crtc, list_for_each_entry(crtc,
&ddev->mode_config.crtc_list, head) { &ddev->mode_config.crtc_list, head) {
...@@ -1783,6 +1785,12 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev) ...@@ -1783,6 +1785,12 @@ static void radeon_pm_compute_clocks_dpm(struct radeon_device *rdev)
if (crtc->enabled) { if (crtc->enabled) {
rdev->pm.dpm.new_active_crtcs |= (1 << radeon_crtc->crtc_id); rdev->pm.dpm.new_active_crtcs |= (1 << radeon_crtc->crtc_id);
rdev->pm.dpm.new_active_crtc_count++; rdev->pm.dpm.new_active_crtc_count++;
if (!radeon_crtc->connector)
continue;
radeon_connector = to_radeon_connector(radeon_crtc->connector);
if (radeon_connector->pixelclock_for_modeset > 297000)
rdev->pm.dpm.high_pixelclock_count++;
} }
} }
} }
......
This diff is collapsed.
...@@ -191,6 +191,14 @@ struct SISLANDS_SMC_SWSTATE ...@@ -191,6 +191,14 @@ struct SISLANDS_SMC_SWSTATE
typedef struct SISLANDS_SMC_SWSTATE SISLANDS_SMC_SWSTATE; typedef struct SISLANDS_SMC_SWSTATE SISLANDS_SMC_SWSTATE;
struct SISLANDS_SMC_SWSTATE_SINGLE {
uint8_t flags;
uint8_t levelCount;
uint8_t padding2;
uint8_t padding3;
SISLANDS_SMC_HW_PERFORMANCE_LEVEL level;
};
#define SISLANDS_SMC_VOLTAGEMASK_VDDC 0 #define SISLANDS_SMC_VOLTAGEMASK_VDDC 0
#define SISLANDS_SMC_VOLTAGEMASK_MVDD 1 #define SISLANDS_SMC_VOLTAGEMASK_MVDD 1
#define SISLANDS_SMC_VOLTAGEMASK_VDDCI 2 #define SISLANDS_SMC_VOLTAGEMASK_VDDCI 2
...@@ -208,19 +216,19 @@ typedef struct SISLANDS_SMC_VOLTAGEMASKTABLE SISLANDS_SMC_VOLTAGEMASKTABLE; ...@@ -208,19 +216,19 @@ typedef struct SISLANDS_SMC_VOLTAGEMASKTABLE SISLANDS_SMC_VOLTAGEMASKTABLE;
struct SISLANDS_SMC_STATETABLE struct SISLANDS_SMC_STATETABLE
{ {
uint8_t thermalProtectType; uint8_t thermalProtectType;
uint8_t systemFlags; uint8_t systemFlags;
uint8_t maxVDDCIndexInPPTable; uint8_t maxVDDCIndexInPPTable;
uint8_t extraFlags; uint8_t extraFlags;
uint32_t lowSMIO[SISLANDS_MAX_NO_VREG_STEPS]; uint32_t lowSMIO[SISLANDS_MAX_NO_VREG_STEPS];
SISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable; SISLANDS_SMC_VOLTAGEMASKTABLE voltageMaskTable;
SISLANDS_SMC_VOLTAGEMASKTABLE phaseMaskTable; SISLANDS_SMC_VOLTAGEMASKTABLE phaseMaskTable;
PP_SIslands_DPM2Parameters dpm2Params; PP_SIslands_DPM2Parameters dpm2Params;
SISLANDS_SMC_SWSTATE initialState; struct SISLANDS_SMC_SWSTATE_SINGLE initialState;
SISLANDS_SMC_SWSTATE ACPIState; struct SISLANDS_SMC_SWSTATE_SINGLE ACPIState;
SISLANDS_SMC_SWSTATE ULVState; struct SISLANDS_SMC_SWSTATE_SINGLE ULVState;
SISLANDS_SMC_SWSTATE driverState; SISLANDS_SMC_SWSTATE driverState;
SISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1]; SISLANDS_SMC_HW_PERFORMANCE_LEVEL dpmLevels[SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE];
}; };
typedef struct SISLANDS_SMC_STATETABLE SISLANDS_SMC_STATETABLE; typedef struct SISLANDS_SMC_STATETABLE SISLANDS_SMC_STATETABLE;
......
...@@ -197,12 +197,6 @@ struct vc4_vec_connector { ...@@ -197,12 +197,6 @@ struct vc4_vec_connector {
struct drm_encoder *encoder; struct drm_encoder *encoder;
}; };
static inline struct vc4_vec_connector *
to_vc4_vec_connector(struct drm_connector *connector)
{
return container_of(connector, struct vc4_vec_connector, base);
}
enum vc4_vec_tv_mode_id { enum vc4_vec_tv_mode_id {
VC4_VEC_TV_MODE_NTSC, VC4_VEC_TV_MODE_NTSC,
VC4_VEC_TV_MODE_NTSC_J, VC4_VEC_TV_MODE_NTSC_J,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment