Skip to content

Commit 86d8f90

Browse files
committed
Merge tag 'amd-drm-fixes-6.7-2023-11-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.7-2023-11-17: amdgpu: - DMCUB fixes - SR-IOV fix - GMC9 fix - Documentation fix - DSC MST fix - CS chunk parsing fix - SMU13.0.6 fixes - 8K tiled display fix - Fix potential NULL pointer dereferences - Cursor lag fix - Backlight fix - DCN s0ix fix - XGMI fix - DCN encoder disable logic fix - AGP aperture fixes Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231117063441.4883-1-alexander.deucher@amd.com
2 parents 63957f6 + e8c2d3e commit 86d8f90

26 files changed

Lines changed: 160 additions & 84 deletions

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ extern int amdgpu_umsch_mm;
248248
extern int amdgpu_seamless;
249249

250250
extern int amdgpu_user_partt_mode;
251+
extern int amdgpu_agp;
251252

252253
#define AMDGPU_VM_MAX_NUM_CTX 4096
253254
#define AMDGPU_SG_THRESHOLD (256*1024*1024)

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
207207
}
208208

209209
for (i = 0; i < p->nchunks; i++) {
210-
struct drm_amdgpu_cs_chunk __user **chunk_ptr = NULL;
210+
struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
211211
struct drm_amdgpu_cs_chunk user_chunk;
212212
uint32_t __user *cdata;
213213

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ int amdgpu_user_partt_mode = AMDGPU_AUTO_COMPUTE_PARTITION_MODE;
207207
int amdgpu_umsch_mm;
208208
int amdgpu_seamless = -1; /* auto */
209209
uint amdgpu_debug_mask;
210+
int amdgpu_agp = -1; /* auto */
210211

211212
static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work);
212213

@@ -961,6 +962,15 @@ module_param_named(seamless, amdgpu_seamless, int, 0444);
961962
MODULE_PARM_DESC(debug_mask, "debug options for amdgpu, disabled by default");
962963
module_param_named(debug_mask, amdgpu_debug_mask, uint, 0444);
963964

965+
/**
966+
* DOC: agp (int)
967+
* Enable the AGP aperture. This provides an aperture in the GPU's internal
968+
* address space for direct access to system memory. Note that these accesses
969+
* are non-snooped, so they are only used for access to uncached memory.
970+
*/
971+
MODULE_PARM_DESC(agp, "AGP (-1 = auto (default), 0 = disable, 1 = enable)");
972+
module_param_named(agp, amdgpu_agp, int, 0444);
973+
964974
/* These devices are not supported by amdgpu.
965975
* They are supported by the mach64, r128, radeon drivers
966976
*/

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,11 @@ int psp_xgmi_get_topology_info(struct psp_context *psp,
14731473
topology->nodes[i].num_links = (requires_reflection && topology->nodes[i].num_links) ?
14741474
topology->nodes[i].num_links : node_num_links;
14751475
}
1476+
/* popluate the connected port num info if supported and available */
1477+
if (ta_port_num_support && topology->nodes[i].num_links) {
1478+
memcpy(topology->nodes[i].port_num, link_extend_info_output->nodes[i].port_num,
1479+
sizeof(struct xgmi_connected_port_num) * TA_XGMI__MAX_PORT_NUM);
1480+
}
14761481

14771482
/* reflect the topology information for bi-directionality */
14781483
if (requires_reflection && topology->nodes[i].num_hops)

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ struct psp_xgmi_node_info {
150150
uint8_t is_sharing_enabled;
151151
enum ta_xgmi_assigned_sdma_engine sdma_engine;
152152
uint8_t num_links;
153+
struct xgmi_connected_port_num port_num[TA_XGMI__MAX_PORT_NUM];
153154
};
154155

155156
struct psp_xgmi_topology_info {

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ static int amdgpu_ras_query_error_status_helper(struct amdgpu_device *adev,
11881188
}
11891189

11901190
if (block_obj->hw_ops->query_ras_error_count)
1191-
block_obj->hw_ops->query_ras_error_count(adev, &err_data);
1191+
block_obj->hw_ops->query_ras_error_count(adev, err_data);
11921192

11931193
if ((info->head.block == AMDGPU_RAS_BLOCK__SDMA) ||
11941194
(info->head.block == AMDGPU_RAS_BLOCK__GFX) ||

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
398398
* amdgpu_uvd_entity_init - init entity
399399
*
400400
* @adev: amdgpu_device pointer
401+
* @ring: amdgpu_ring pointer to check
401402
*
402403
* Initialize the entity used for handle management in the kernel driver.
403404
*/

drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev)
230230
* amdgpu_vce_entity_init - init entity
231231
*
232232
* @adev: amdgpu_device pointer
233+
* @ring: amdgpu_ring pointer to check
233234
*
234235
* Initialize the entity used for handle management in the kernel driver.
235236
*/

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static void gmc_v10_0_vram_gtt_location(struct amdgpu_device *adev,
675675
amdgpu_gmc_set_agp_default(adev, mc);
676676
amdgpu_gmc_vram_location(adev, &adev->gmc, base);
677677
amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_BEST_FIT);
678-
if (!amdgpu_sriov_vf(adev))
678+
if (!amdgpu_sriov_vf(adev) && (amdgpu_agp == 1))
679679
amdgpu_gmc_agp_location(adev, mc);
680680

681681
/* base offset of vram pages */

drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,9 @@ static void gmc_v11_0_vram_gtt_location(struct amdgpu_device *adev,
640640
amdgpu_gmc_set_agp_default(adev, mc);
641641
amdgpu_gmc_vram_location(adev, &adev->gmc, base);
642642
amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_HIGH);
643-
if (!amdgpu_sriov_vf(adev) ||
644-
(amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(11, 5, 0)))
643+
if (!amdgpu_sriov_vf(adev) &&
644+
(amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(11, 5, 0)) &&
645+
(amdgpu_agp == 1))
645646
amdgpu_gmc_agp_location(adev, mc);
646647

647648
/* base offset of vram pages */

0 commit comments

Comments
 (0)