Skip to content

Commit 768b47b

Browse files
committed
Merge tag 'drm-fixes-2019-10-04' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Been offline for 3 days, got back and had some fixes queued up. Nothing too major, the i915 dp-mst fix is important, and amdgpu has a bulk move speedup fix and some regressions, but nothing too insane for an rc2 pull. The intel fixes are also 2 weeks worth, they missed the boat last week. core: - writeback fixes i915: - Fix DP-MST crtc_mask - Fix dsc dpp calculations - Fix g4x sprite scaling stride check with GTT remapping - Fix concurrence on cases where requests where getting retired at same time as resubmitted to HW - Fix gen9 display resolutions by setting the right max plane width - Fix GPU hang on preemption - Mark contents as dirty on a write fault. This was breaking cursor sprite with dumb buffers. komeda: - memory leak fix tilcdc: - include fix amdgpu: - Enable bulk moves - Power metrics fixes for Navi - Fix S4 regression - Add query for tcc disabled mask - Fix several leaks in error paths - randconfig fixes - clang fixes" * tag 'drm-fixes-2019-10-04' of git://anongit.freedesktop.org/drm/drm: (21 commits) Revert "drm/i915: Fix DP-MST crtc_mask" drm/omap: fix max fclk divider for omap36xx drm/i915: Fix g4x sprite scaling stride check with GTT remapping drm/i915/dp: Fix dsc bpp calculations, v5. drm/amd/display: fix dcn21 Makefile for clang drm/amd/display: hide an unused variable drm/amdgpu: display_mode_vba_21: remove uint typedef drm/amdgpu: hide another #warning drm/amdgpu: make pmu support optional, again drm/amd/display: memory leak drm/amdgpu: fix multiple memory leaks in acp_hw_init drm/amdgpu: return tcc_disabled_mask to userspace drm/amdgpu: don't increment vram lost if we are in hibernation Revert "drm/amdgpu: disable stutter mode for renoir" drm/amd/powerplay: add sensor lock support for smu drm/amd/powerplay: change metrics update period from 1ms to 100ms drm/amdgpu: revert "disable bulk moves for now" drm/tilcdc: include linux/pinctrl/consumer.h again drm/komeda: prevent memory leak in komeda_wb_connector_add drm: Clear the fence pointer when writeback job signaled ...
2 parents c4bd70e + 07bba34 commit 768b47b

39 files changed

+232
-159
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \
5454
amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
5555
amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \
5656
amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
57-
amdgpu_vm_sdma.o amdgpu_pmu.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o
57+
amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o
5858

5959
amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o
6060

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

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int acp_hw_init(void *handle)
189189
u32 val = 0;
190190
u32 count = 0;
191191
struct device *dev;
192-
struct i2s_platform_data *i2s_pdata;
192+
struct i2s_platform_data *i2s_pdata = NULL;
193193

194194
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
195195

@@ -231,20 +231,21 @@ static int acp_hw_init(void *handle)
231231
adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell),
232232
GFP_KERNEL);
233233

234-
if (adev->acp.acp_cell == NULL)
235-
return -ENOMEM;
234+
if (adev->acp.acp_cell == NULL) {
235+
r = -ENOMEM;
236+
goto failure;
237+
}
236238

237239
adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL);
238240
if (adev->acp.acp_res == NULL) {
239-
kfree(adev->acp.acp_cell);
240-
return -ENOMEM;
241+
r = -ENOMEM;
242+
goto failure;
241243
}
242244

243245
i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL);
244246
if (i2s_pdata == NULL) {
245-
kfree(adev->acp.acp_res);
246-
kfree(adev->acp.acp_cell);
247-
return -ENOMEM;
247+
r = -ENOMEM;
248+
goto failure;
248249
}
249250

250251
switch (adev->asic_type) {
@@ -341,14 +342,14 @@ static int acp_hw_init(void *handle)
341342
r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell,
342343
ACP_DEVS);
343344
if (r)
344-
return r;
345+
goto failure;
345346

346347
for (i = 0; i < ACP_DEVS ; i++) {
347348
dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
348349
r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev);
349350
if (r) {
350351
dev_err(dev, "Failed to add dev to genpd\n");
351-
return r;
352+
goto failure;
352353
}
353354
}
354355

@@ -367,7 +368,8 @@ static int acp_hw_init(void *handle)
367368
break;
368369
if (--count == 0) {
369370
dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
370-
return -ETIMEDOUT;
371+
r = -ETIMEDOUT;
372+
goto failure;
371373
}
372374
udelay(100);
373375
}
@@ -384,7 +386,8 @@ static int acp_hw_init(void *handle)
384386
break;
385387
if (--count == 0) {
386388
dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
387-
return -ETIMEDOUT;
389+
r = -ETIMEDOUT;
390+
goto failure;
388391
}
389392
udelay(100);
390393
}
@@ -393,6 +396,13 @@ static int acp_hw_init(void *handle)
393396
val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
394397
cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
395398
return 0;
399+
400+
failure:
401+
kfree(i2s_pdata);
402+
kfree(adev->acp.acp_res);
403+
kfree(adev->acp.acp_cell);
404+
kfree(adev->acp.acp_genpd);
405+
return r;
396406
}
397407

398408
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@
8181
* - 3.32.0 - Add syncobj timeline support to AMDGPU_CS.
8282
* - 3.33.0 - Fixes for GDS ENOMEM failures in AMDGPU_CS.
8383
* - 3.34.0 - Non-DC can flip correctly between buffers with different pitches
84+
* - 3.35.0 - Add drm_amdgpu_info_device::tcc_disabled_mask
8485
*/
8586
#define KMS_DRIVER_MAJOR 3
86-
#define KMS_DRIVER_MINOR 34
87+
#define KMS_DRIVER_MINOR 35
8788
#define KMS_DRIVER_PATCHLEVEL 0
8889

8990
#define AMDGPU_MAX_TIMEOUT_PARAM_LENTH 256

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ struct amdgpu_gfx_config {
165165
uint32_t num_sc_per_sh;
166166
uint32_t num_packer_per_sc;
167167
uint32_t pa_sc_tile_steering_override;
168+
uint64_t tcc_disabled_mask;
168169
};
169170

170171
struct amdgpu_cu_info {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
787787
dev_info.pa_sc_tile_steering_override =
788788
adev->gfx.config.pa_sc_tile_steering_override;
789789

790+
dev_info.tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;
791+
790792
return copy_to_user(out, &dev_info,
791793
min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
792794
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,14 +603,12 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,
603603
struct ttm_bo_global *glob = adev->mman.bdev.glob;
604604
struct amdgpu_vm_bo_base *bo_base;
605605

606-
#if 0
607606
if (vm->bulk_moveable) {
608607
spin_lock(&glob->lru_lock);
609608
ttm_bo_bulk_move_lru_tail(&vm->lru_bulk_move);
610609
spin_unlock(&glob->lru_lock);
611610
return;
612611
}
613-
#endif
614612

615613
memset(&vm->lru_bulk_move, 0, sizeof(vm->lru_bulk_move));
616614

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,17 @@ static void gfx_v10_0_tcp_harvest(struct amdgpu_device *adev)
16911691
}
16921692
}
16931693

1694+
static void gfx_v10_0_get_tcc_info(struct amdgpu_device *adev)
1695+
{
1696+
/* TCCs are global (not instanced). */
1697+
uint32_t tcc_disable = RREG32_SOC15(GC, 0, mmCGTS_TCC_DISABLE) |
1698+
RREG32_SOC15(GC, 0, mmCGTS_USER_TCC_DISABLE);
1699+
1700+
adev->gfx.config.tcc_disabled_mask =
1701+
REG_GET_FIELD(tcc_disable, CGTS_TCC_DISABLE, TCC_DISABLE) |
1702+
(REG_GET_FIELD(tcc_disable, CGTS_TCC_DISABLE, HI_TCC_DISABLE) << 16);
1703+
}
1704+
16941705
static void gfx_v10_0_constants_init(struct amdgpu_device *adev)
16951706
{
16961707
u32 tmp;
@@ -1702,6 +1713,7 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)
17021713

17031714
gfx_v10_0_setup_rb(adev);
17041715
gfx_v10_0_get_cu_info(adev, &adev->gfx.cu_info);
1716+
gfx_v10_0_get_tcc_info(adev);
17051717
adev->gfx.config.pa_sc_tile_steering_override =
17061718
gfx_v10_0_init_pa_sc_tile_steering_override(adev);
17071719

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,12 @@ static int nv_asic_reset(struct amdgpu_device *adev)
317317
struct smu_context *smu = &adev->smu;
318318

319319
if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
320-
amdgpu_inc_vram_lost(adev);
320+
if (!adev->in_suspend)
321+
amdgpu_inc_vram_lost(adev);
321322
ret = smu_baco_reset(smu);
322323
} else {
323-
amdgpu_inc_vram_lost(adev);
324+
if (!adev->in_suspend)
325+
amdgpu_inc_vram_lost(adev);
324326
ret = nv_asic_mode1_reset(adev);
325327
}
326328

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,14 @@ static int soc15_asic_reset(struct amdgpu_device *adev)
558558
{
559559
switch (soc15_asic_reset_method(adev)) {
560560
case AMD_RESET_METHOD_BACO:
561-
amdgpu_inc_vram_lost(adev);
561+
if (!adev->in_suspend)
562+
amdgpu_inc_vram_lost(adev);
562563
return soc15_asic_baco_reset(adev);
563564
case AMD_RESET_METHOD_MODE2:
564565
return soc15_mode2_reset(adev);
565566
default:
566-
amdgpu_inc_vram_lost(adev);
567+
if (!adev->in_suspend)
568+
amdgpu_inc_vram_lost(adev);
567569
return soc15_asic_mode1_reset(adev);
568570
}
569571
}
@@ -771,8 +773,6 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)
771773
#if defined(CONFIG_DRM_AMD_DC)
772774
else if (amdgpu_device_has_dc_support(adev))
773775
amdgpu_device_ip_block_add(adev, &dm_ip_block);
774-
#else
775-
# warning "Enable CONFIG_DRM_AMD_DC for display support on SOC15."
776776
#endif
777777
amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
778778
break;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
23852385

23862386
if (adev->asic_type != CHIP_CARRIZO && adev->asic_type != CHIP_STONEY)
23872387
dm->dc->debug.disable_stutter = amdgpu_pp_feature_mask & PP_STUTTER_MODE ? false : true;
2388-
if (adev->asic_type == CHIP_RENOIR)
2389-
dm->dc->debug.disable_stutter = true;
23902388

23912389
return 0;
23922390
fail:
@@ -6019,7 +6017,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev,
60196017
struct drm_crtc *crtc;
60206018
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
60216019
int i;
6020+
#ifdef CONFIG_DEBUG_FS
60226021
enum amdgpu_dm_pipe_crc_source source;
6022+
#endif
60236023

60246024
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
60256025
new_crtc_state, i) {

0 commit comments

Comments
 (0)