Skip to content

Commit fec67d1

Browse files
committed
Merge tag 'amd-drm-next-6.3-2023-02-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.3-2023-02-17: amdgpu: - GC 11 fixes - Display fixes - Backlight cleanup - SMU13 fixes - SMU7 regression fix - GFX9 sw queues fix - AGP fix for GMC 11 - W1 warning fixes - S/G display fixes - Misc spelling fixes - Driver unload fix - DCN 3.1.4 fixes - Display code reorg fixes - Rotation fixes Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents ef04277 + 80c6d68 commit fec67d1

File tree

148 files changed

+7488
-5708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+7488
-5708
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
3434
-I$(FULL_AMD_PATH)/acp/include \
3535
-I$(FULL_AMD_DISPLAY_PATH) \
3636
-I$(FULL_AMD_DISPLAY_PATH)/include \
37+
-I$(FULL_AMD_DISPLAY_PATH)/modules/inc \
3738
-I$(FULL_AMD_DISPLAY_PATH)/dc \
3839
-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
3940
-I$(FULL_AMD_PATH)/amdkfd
@@ -76,7 +77,7 @@ amdgpu-y += \
7677
vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \
7778
vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o arct_reg_init.o mxgpu_nv.o \
7879
nbio_v7_2.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o soc21.o \
79-
sienna_cichlid.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o
80+
sienna_cichlid.o smu_v13_0_10.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o
8081

8182
# add DF block
8283
amdgpu-y += \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ extern int amdgpu_num_kcq;
242242

243243
#define AMDGPU_VCNFW_LOG_SIZE (32 * 1024)
244244
extern int amdgpu_vcnfw_log;
245+
extern int amdgpu_sg_display;
245246

246247
#define AMDGPU_VM_MAX_NUM_CTX 4096
247248
#define AMDGPU_SG_THRESHOLD (256*1024*1024)

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev);
164164
*
165165
* The amdgpu driver provides a sysfs API for reporting the product name
166166
* for the device
167-
* The file serial_number is used for this and returns the product name
167+
* The file product_name is used for this and returns the product name
168168
* as returned from the FRU.
169169
* NOTE: This is only available for certain server cards
170170
*/
@@ -186,7 +186,7 @@ static DEVICE_ATTR(product_name, S_IRUGO,
186186
*
187187
* The amdgpu driver provides a sysfs API for reporting the part number
188188
* for the device
189-
* The file serial_number is used for this and returns the part number
189+
* The file product_number is used for this and returns the part number
190190
* as returned from the FRU.
191191
* NOTE: This is only available for certain server cards
192192
*/
@@ -4270,6 +4270,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
42704270
}
42714271
adev->in_suspend = false;
42724272

4273+
if (adev->enable_mes)
4274+
amdgpu_mes_self_test(adev);
4275+
42734276
if (amdgpu_acpi_smart_shift_update(dev, AMDGPU_SS_DEV_D0))
42744277
DRM_WARN("smart shift update failed\n");
42754278

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ int amdgpu_num_kcq = -1;
188188
int amdgpu_smartshift_bias;
189189
int amdgpu_use_xgmi_p2p = 1;
190190
int amdgpu_vcnfw_log;
191+
int amdgpu_sg_display = -1; /* auto */
191192

192193
static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work);
193194

@@ -933,6 +934,16 @@ module_param_named(num_kcq, amdgpu_num_kcq, int, 0444);
933934
MODULE_PARM_DESC(vcnfw_log, "Enable vcnfw log(0 = disable (default value), 1 = enable)");
934935
module_param_named(vcnfw_log, amdgpu_vcnfw_log, int, 0444);
935936

937+
/**
938+
* DOC: sg_display (int)
939+
* Disable S/G (scatter/gather) display (i.e., display from system memory).
940+
* This option is only relevant on APUs. Set this option to 0 to disable
941+
* S/G display if you experience flickering or other issues under memory
942+
* pressure and report the issue.
943+
*/
944+
MODULE_PARM_DESC(sg_display, "S/G Display (-1 = auto (default), 0 = disable)");
945+
module_param_named(sg_display, amdgpu_sg_display, int, 0444);
946+
936947
/**
937948
* DOC: smu_pptable_id (int)
938949
* Used to override pptable id. id = 0 use VBIOS pptable.

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,13 @@ void amdgpu_fence_driver_sw_fini(struct amdgpu_device *adev)
618618
if (!ring || !ring->fence_drv.initialized)
619619
continue;
620620

621-
if (!ring->no_scheduler)
621+
/*
622+
* Notice we check for sched.ops since there's some
623+
* override on the meaning of sched.ready by amdgpu.
624+
* The natural check would be sched.ready, which is
625+
* set as drm_sched_init() finishes...
626+
*/
627+
if (ring->sched.ops)
622628
drm_sched_fini(&ring->sched);
623629

624630
for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ psp_cmd_submit_buf(struct psp_context *psp,
620620
*/
621621
if (!dev_entered)
622622
WARN_ON(psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_LOAD_ASD &&
623-
psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_UNLOAD_TA);
623+
psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_UNLOAD_TA &&
624+
psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_INVOKE_CMD);
624625

625626
memset(psp->cmd_buf_mem, 0, PSP_CMD_BUFFER_SIZE);
626627

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "amdgpu_reset.h"
2525
#include "aldebaran.h"
2626
#include "sienna_cichlid.h"
27+
#include "smu_v13_0_10.h"
2728

2829
int amdgpu_reset_add_handler(struct amdgpu_reset_control *reset_ctl,
2930
struct amdgpu_reset_handler *handler)
@@ -44,6 +45,9 @@ int amdgpu_reset_init(struct amdgpu_device *adev)
4445
case IP_VERSION(11, 0, 7):
4546
ret = sienna_cichlid_reset_init(adev);
4647
break;
48+
case IP_VERSION(13, 0, 10):
49+
ret = smu_v13_0_10_reset_init(adev);
50+
break;
4751
default:
4852
break;
4953
}
@@ -62,6 +66,9 @@ int amdgpu_reset_fini(struct amdgpu_device *adev)
6266
case IP_VERSION(11, 0, 7):
6367
ret = sienna_cichlid_reset_fini(adev);
6468
break;
69+
case IP_VERSION(13, 0, 10):
70+
ret = smu_v13_0_10_reset_fini(adev);
71+
break;
6572
default:
6673
break;
6774
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ struct amdgpu_ring {
295295
#define amdgpu_ring_parse_cs(r, p, job, ib) ((r)->funcs->parse_cs((p), (job), (ib)))
296296
#define amdgpu_ring_patch_cs_in_place(r, p, job, ib) ((r)->funcs->patch_cs_in_place((p), (job), (ib)))
297297
#define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r))
298-
#define amdgpu_ring_test_ib(r, t) (r)->funcs->test_ib((r), (t))
298+
#define amdgpu_ring_test_ib(r, t) ((r)->funcs->test_ib ? (r)->funcs->test_ib((r), (t)) : 0)
299299
#define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r))
300300
#define amdgpu_ring_get_wptr(r) (r)->funcs->get_wptr((r))
301301
#define amdgpu_ring_set_wptr(r) (r)->funcs->set_wptr((r))

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ struct amdgpu_firmware {
538538

539539
void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
540540
void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
541+
void amdgpu_ucode_print_imu_hdr(const struct common_firmware_header *hdr);
541542
void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr);
542543
void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr);
543544
void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,9 +983,13 @@ static u32 amdgpu_virt_rlcg_reg_rw(struct amdgpu_device *adev, u32 offset, u32 v
983983
if (offset == reg_access_ctrl->grbm_cntl) {
984984
/* if the target reg offset is grbm_cntl, write to scratch_reg2 */
985985
writel(v, scratch_reg2);
986+
if (flag == AMDGPU_RLCG_GC_WRITE_LEGACY)
987+
writel(v, ((void __iomem *)adev->rmmio) + (offset * 4));
986988
} else if (offset == reg_access_ctrl->grbm_idx) {
987989
/* if the target reg offset is grbm_idx, write to scratch_reg3 */
988990
writel(v, scratch_reg3);
991+
if (flag == AMDGPU_RLCG_GC_WRITE_LEGACY)
992+
writel(v, ((void __iomem *)adev->rmmio) + (offset * 4));
989993
} else {
990994
/*
991995
* SCRATCH_REG0 = read/write value

0 commit comments

Comments
 (0)