Skip to content

Commit 6910b67

Browse files
committed
Merge tag 'drm-fixes-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Unfortunately this has a bit of thanksgiving stuffing in it, as it a bit larger (at least the vc4 patches) than I like at this point in time. The main thing is it has a bunch of regressions fixes for reports in the last couple of weeks, ast, nouveau and the amdgpu ttm init fix, along with the usual selection of amdgpu and i915 fixes. The vc4 fixes are a few but they are fixes and the nastiest one is a fix for when you have a 2.4Ghz Wifi and a HDMI signal with a clock in that range and there isn't enough shielding and interference happen between the two, the fix adjusts the mode clock to try and avoid the wifi channels in that case. Hopefully you can merge this between turkey slices, and next week should be quieter. ast: - LUT loading regression fix nouveau: - relocations regression fix amdgpu: - ttm init oops fix - Runtime pm fix - SI UVD suspend/resume fix - HDCP fix for headless cards - Sienna Cichlid golden register update i915: - Fix Perf/OA workaround register corruption (Lionel) - Correct a comment statement in GVT (Yan) - Fix GT enable/disable iterrupts, including a race condition that prevented GPU to go idle (Chris) - Free stale request on destroying the virtual engine (Chris) exynos: - config dependency fix mediatek: - unused var removal - horizonal front/back porch formula fix vc4: - wifi and hdmi interference fix - mode rejection fixes - use after free fix - cleanup some code" * tag 'drm-fixes-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm: (28 commits) drm/nouveau: fix relocations applying logic and a double-free drm/ast: Reload gamma LUT after changing primary plane's color format drm/amdgpu: Fix size calculation when init onchip memory drm/amdgpu: update golden setting for sienna_cichlid drm/amd/display: Avoid HDCP initialization in devices without output drm/i915/gt: Free stale request on destroying the virtual engine drm/i915/gt: Don't cancel the interrupt shadow too early drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock drm/amdgpu: fix a page fault drm/amdgpu: fix SI UVD firmware validate resume fail drm/amd/amdgpu: fix null pointer in runtime pm drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission drm/i915/gvt: correct a false comment of flag F_UNALIGN drm/i915/perf: workaround register corruption in OATAILPTR drm/vc4: kms: Don't disable the muxing of an active CRTC drm/vc4: kms: Store the unassigned channel list in the state drm/exynos: depend on COMMON_CLK to fix compile tests drm/mediatek: dsi: Modify horizontal front/back porch byte formula drm/vc4: hdmi: Disable Wifi Frequencies dt-bindings: display: Add a property to deal with WiFi coexistence ...
2 parents 99c710c + 9595930 commit 6910b67

23 files changed

Lines changed: 475 additions & 193 deletions

File tree

Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ properties:
7676
resets:
7777
maxItems: 1
7878

79+
wifi-2.4ghz-coexistence:
80+
type: boolean
81+
description: >
82+
Should the pixel frequencies in the WiFi frequencies range be
83+
avoided?
84+
7985
required:
8086
- compatible
8187
- reg

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4852,7 +4852,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
48524852
if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
48534853
return -ENOTSUPP;
48544854

4855-
if (ras && ras->supported)
4855+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48564856
adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
48574857

48584858
return amdgpu_dpm_baco_enter(adev);
@@ -4871,7 +4871,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
48714871
if (ret)
48724872
return ret;
48734873

4874-
if (ras && ras->supported)
4874+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48754875
adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
48764876

48774877
return 0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ static int amdgpu_ttm_backend_bind(struct ttm_bo_device *bdev,
6969

7070
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
7171
unsigned int type,
72-
uint64_t size)
72+
uint64_t size_in_page)
7373
{
7474
return ttm_range_man_init(&adev->mman.bdev, type,
75-
false, size >> PAGE_SHIFT);
75+
false, size_in_page);
7676
}
7777

7878
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct amdgpu_uvd {
6767
unsigned harvest_config;
6868
/* store image width to adjust nb memory state */
6969
unsigned decode_image_width;
70+
uint32_t keyselect;
7071
};
7172

7273
int amdgpu_uvd_sw_init(struct amdgpu_device *adev);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,6 +3105,8 @@ static const struct soc15_reg_golden golden_settings_gc_10_3[] =
31053105
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
31063106
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
31073107
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
3108+
SOC15_REG_GOLDEN_VALUE(GC, 0 ,mmGCEA_SDP_TAG_RESERVE0, 0xffffffff, 0x10100100),
3109+
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCEA_SDP_TAG_RESERVE1, 0xffffffff, 0x17000088),
31083110
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
31093111
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003fffff, 0x00280400),
31103112
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,8 @@ static void uvd_v3_1_mc_resume(struct amdgpu_device *adev)
277277
*/
278278
static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)
279279
{
280-
void *ptr;
281-
uint32_t ucode_len, i;
282-
uint32_t keysel;
283-
284-
ptr = adev->uvd.inst[0].cpu_addr;
285-
ptr += 192 + 16;
286-
memcpy(&ucode_len, ptr, 4);
287-
ptr += ucode_len;
288-
memcpy(&keysel, ptr, 4);
280+
int i;
281+
uint32_t keysel = adev->uvd.keyselect;
289282

290283
WREG32(mmUVD_FW_START, keysel);
291284

@@ -550,6 +543,8 @@ static int uvd_v3_1_sw_init(void *handle)
550543
struct amdgpu_ring *ring;
551544
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
552545
int r;
546+
void *ptr;
547+
uint32_t ucode_len;
553548

554549
/* UVD TRAP */
555550
r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 124, &adev->uvd.inst->irq);
@@ -571,6 +566,13 @@ static int uvd_v3_1_sw_init(void *handle)
571566
if (r)
572567
return r;
573568

569+
/* Retrieval firmware validate key */
570+
ptr = adev->uvd.inst[0].cpu_addr;
571+
ptr += 192 + 16;
572+
memcpy(&ucode_len, ptr, 4);
573+
ptr += ucode_len;
574+
memcpy(&adev->uvd.keyselect, ptr, 4);
575+
574576
r = amdgpu_uvd_entity_init(adev);
575577

576578
return r;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
10411041
amdgpu_dm_init_color_mod();
10421042

10431043
#ifdef CONFIG_DRM_AMD_DC_HDCP
1044-
if (adev->asic_type >= CHIP_RAVEN) {
1044+
if (adev->dm.dc->caps.max_links > 0 && adev->asic_type >= CHIP_RAVEN) {
10451045
adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
10461046

10471047
if (!adev->dm.hdcp_workqueue)

drivers/gpu/drm/ast/ast_mode.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,6 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
742742
case DRM_MODE_DPMS_SUSPEND:
743743
if (ast->tx_chip_type == AST_TX_DP501)
744744
ast_set_dp501_video_output(crtc->dev, 1);
745-
ast_crtc_load_lut(ast, crtc);
746745
break;
747746
case DRM_MODE_DPMS_OFF:
748747
if (ast->tx_chip_type == AST_TX_DP501)
@@ -777,6 +776,21 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
777776
return 0;
778777
}
779778

779+
static void
780+
ast_crtc_helper_atomic_flush(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state)
781+
{
782+
struct ast_private *ast = to_ast_private(crtc->dev);
783+
struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc->state);
784+
struct ast_crtc_state *old_ast_crtc_state = to_ast_crtc_state(old_crtc_state);
785+
786+
/*
787+
* The gamma LUT has to be reloaded after changing the primary
788+
* plane's color format.
789+
*/
790+
if (old_ast_crtc_state->format != ast_crtc_state->format)
791+
ast_crtc_load_lut(ast, crtc);
792+
}
793+
780794
static void
781795
ast_crtc_helper_atomic_enable(struct drm_crtc *crtc,
782796
struct drm_crtc_state *old_crtc_state)
@@ -830,6 +844,7 @@ ast_crtc_helper_atomic_disable(struct drm_crtc *crtc,
830844

831845
static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
832846
.atomic_check = ast_crtc_helper_atomic_check,
847+
.atomic_flush = ast_crtc_helper_atomic_flush,
833848
.atomic_enable = ast_crtc_helper_atomic_enable,
834849
.atomic_disable = ast_crtc_helper_atomic_disable,
835850
};

drivers/gpu/drm/exynos/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config DRM_EXYNOS
33
tristate "DRM Support for Samsung SoC Exynos Series"
4-
depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST)
4+
depends on OF && DRM && COMMON_CLK
5+
depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST
56
depends on MMU
67
select DRM_KMS_HELPER
78
select VIDEOMODE_HELPERS

0 commit comments

Comments
 (0)