Skip to content

Commit f5e94d1

Browse files
committed
Merge tag 'drm-next-2020-04-08' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "This is a set of fixes that have queued up, I think I might have another pull with some more before rc1 but I'd like to dequeue what I have now just in case Easter is more eggciting that expected. The main thing in here is a fix for a longstanding nouveau power management issues on certain laptops, it should help runtime suspend/resume for a lot of people. There is also a reverted patch for some drm_mm behaviour in atomic contexts. Summary: core: - revert drm_mm atomic patch - dt binding fixes fbcon: - null ptr error fix i915: - GVT fixes nouveau: - runpm fix - svm fixes amdgpu: - HDCP fixes - gfx10 fix - Misc display fixes - BACO fixes amdkfd: - Fix memory leak vboxvideo: - remove conflicting fbs vc4: - mode validation fix xen: - fix PTR_ERR usage" * tag 'drm-next-2020-04-08' of git://anongit.freedesktop.org/drm/drm: (41 commits) drm/nouveau/kms/nv50-: wait for FIFO space on PIO channels drm/nouveau/nvif: protect waits against GPU falling off the bus drm/nouveau/nvif: access PTIMER through usermode class, if available drm/nouveau/gr/gp107,gp108: implement workaround for HW hanging during init drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges drm/nouveau/svm: remove useless SVM range check drm/nouveau/svm: check for SVM initialized before migrating drm/nouveau/svm: fix vma range check for migration drm/nouveau: remove checks for return value of debugfs functions drm/nouveau/ttm: evict other IO mappings when running out of BAR1 space drm/amdkfd: kfree the wrong pointer drm/amd/display: increase HDCP authentication delay drm/amd/display: Correctly cancel future watchdog and callback events drm/amd/display: Don't try hdcp1.4 when content_type is set to type1 drm/amd/powerplay: move the ASIC specific nbio operation out of smu_v11_0.c drm/amd/powerplay: drop redundant BIF doorbell interrupt operations drm/amd/display: Fix dcn21 num_states drm/amd/display: Enable BT2020 in COLOR_ENCODING property drm/amd/display: LFC not working on 2.0x range monitors (v2) drm/amd/display: Support plane level CTM ...
2 parents 9ebe542 + 12ab316 commit f5e94d1

Some content is hidden

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

65 files changed

+538
-227
lines changed

Documentation/devicetree/bindings/display/panel/panel-dpi.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ properties:
2121
- {}
2222
- const: panel-dpi
2323

24-
data-mapping:
25-
enum:
26-
- rgb24
27-
- rgb565
28-
- bgr666
29-
description: |
30-
Describes the media format, how the display panel is connected
31-
to the display interface.
32-
3324
backlight: true
3425
enable-gpios: true
3526
height-mm: true
@@ -52,7 +43,6 @@ examples:
5243
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
5344
label = "osddisplay";
5445
power-supply = <&vcc_supply>;
55-
data-mapping = "rgb565";
5646
backlight = <&backlight>;
5747
5848
port {

Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ properties:
6565
ports:
6666
type: object
6767
description:
68-
Ports as described in Documentation/devictree/bindings/graph.txt
68+
Ports as described in Documentation/devicetree/bindings/graph.txt
6969
properties:
7070
"#address-cells":
7171
const: 1
@@ -121,7 +121,7 @@ examples:
121121
#include <dt-bindings/interrupt-controller/irq.h>
122122
#include <dt-bindings/soc/ti,sci_pm_domain.h>
123123
124-
dss: dss@04a00000 {
124+
dss: dss@4a00000 {
125125
compatible = "ti,am65x-dss";
126126
reg = <0x0 0x04a00000 0x0 0x1000>, /* common */
127127
<0x0 0x04a02000 0x0 0x1000>, /* vidl1 */

Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ properties:
9898
ports:
9999
type: object
100100
description:
101-
Ports as described in Documentation/devictree/bindings/graph.txt
101+
Ports as described in Documentation/devicetree/bindings/graph.txt
102102
properties:
103103
"#address-cells":
104104
const: 1
@@ -154,7 +154,7 @@ examples:
154154
#include <dt-bindings/interrupt-controller/irq.h>
155155
#include <dt-bindings/soc/ti,sci_pm_domain.h>
156156
157-
dss: dss@04a00000 {
157+
dss: dss@4a00000 {
158158
compatible = "ti,j721e-dss";
159159
reg = <0x00 0x04a00000 0x00 0x10000>, /* common_m */
160160
<0x00 0x04a10000 0x00 0x10000>, /* common_s0*/

Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ properties:
5656
port:
5757
type: object
5858
description:
59-
Port as described in Documentation/devictree/bindings/graph.txt.
59+
Port as described in Documentation/devicetree/bindings/graph.txt.
6060
The DSS DPI output port node
6161

6262
max-memory-bandwidth:
@@ -81,7 +81,7 @@ examples:
8181
#include <dt-bindings/interrupt-controller/arm-gic.h>
8282
#include <dt-bindings/interrupt-controller/irq.h>
8383
84-
dss: dss@02540000 {
84+
dss: dss@2540000 {
8585
compatible = "ti,k2g-dss";
8686
reg = <0x02540000 0x400>,
8787
<0x02550000 0x1000>,

drivers/dma-buf/Kconfig

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ config DMABUF_MOVE_NOTIFY
4343
bool "Move notify between drivers (EXPERIMENTAL)"
4444
default n
4545
help
46-
Don''t pin buffers if the dynamic DMA-buf interface is available on both the
47-
exporter as well as the importer. This fixes a security problem where
48-
userspace is able to pin unrestricted amounts of memory through DMA-buf.
49-
But marked experimental because we don''t jet have a consistent execution
50-
context and memory management between drivers.
46+
Don't pin buffers if the dynamic DMA-buf interface is available on
47+
both the exporter as well as the importer. This fixes a security
48+
problem where userspace is able to pin unrestricted amounts of memory
49+
through DMA-buf.
50+
This is marked experimental because we don't yet have a consistent
51+
execution context and memory management between drivers.
5152

5253
config DMABUF_SELFTESTS
5354
tristate "Selftests for the dma-buf interfaces"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static int gfx_v10_0_mec_init(struct amdgpu_device *adev)
11131113
return r;
11141114
}
11151115

1116-
memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
1116+
memset(hpd, 0, mec_hpd_size);
11171117

11181118
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
11191119
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ static int gfx_v9_0_mec_init(struct amdgpu_device *adev)
19461946
return r;
19471947
}
19481948

1949-
memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
1949+
memset(hpd, 0, mec_hpd_size);
19501950

19511951
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
19521952
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);

drivers/gpu/drm/amd/amdkfd/kfd_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,9 @@ int kfd_gtt_sa_allocate(struct kfd_dev *kfd, unsigned int size,
11121112
return 0;
11131113

11141114
kfd_gtt_no_free_chunk:
1115-
pr_debug("Allocation failed with mem_obj = %p\n", mem_obj);
1115+
pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj);
11161116
mutex_unlock(&kfd->gtt_sa_lock);
1117-
kfree(mem_obj);
1117+
kfree(*mem_obj);
11181118
return -ENOMEM;
11191119
}
11201120

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,6 +3639,9 @@ fill_dc_plane_info_and_addr(struct amdgpu_device *adev,
36393639
case DRM_FORMAT_NV12:
36403640
plane_info->format = SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb;
36413641
break;
3642+
case DRM_FORMAT_P010:
3643+
plane_info->format = SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb;
3644+
break;
36423645
default:
36433646
DRM_ERROR(
36443647
"Unsupported screen format %s\n",
@@ -5535,6 +5538,8 @@ static int get_plane_formats(const struct drm_plane *plane,
55355538

55365539
if (plane_cap && plane_cap->pixel_format_support.nv12)
55375540
formats[num_formats++] = DRM_FORMAT_NV12;
5541+
if (plane_cap && plane_cap->pixel_format_support.p010)
5542+
formats[num_formats++] = DRM_FORMAT_P010;
55385543
break;
55395544

55405545
case DRM_PLANE_TYPE_OVERLAY:
@@ -5587,12 +5592,15 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
55875592
}
55885593

55895594
if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
5590-
plane_cap && plane_cap->pixel_format_support.nv12) {
5595+
plane_cap &&
5596+
(plane_cap->pixel_format_support.nv12 ||
5597+
plane_cap->pixel_format_support.p010)) {
55915598
/* This only affects YUV formats. */
55925599
drm_plane_create_color_properties(
55935600
plane,
55945601
BIT(DRM_COLOR_YCBCR_BT601) |
5595-
BIT(DRM_COLOR_YCBCR_BT709),
5602+
BIT(DRM_COLOR_YCBCR_BT709) |
5603+
BIT(DRM_COLOR_YCBCR_BT2020),
55965604
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
55975605
BIT(DRM_COLOR_YCBCR_FULL_RANGE),
55985606
DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE);

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,13 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,
192192
&hdcp_work->srm_version);
193193

194194
display->adjust.disable = 0;
195-
if (content_type == DRM_MODE_HDCP_CONTENT_TYPE0)
195+
if (content_type == DRM_MODE_HDCP_CONTENT_TYPE0) {
196+
hdcp_w->link.adjust.hdcp1.disable = 0;
196197
hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0;
197-
else if (content_type == DRM_MODE_HDCP_CONTENT_TYPE1)
198+
} else if (content_type == DRM_MODE_HDCP_CONTENT_TYPE1) {
199+
hdcp_w->link.adjust.hdcp1.disable = 1;
198200
hdcp_w->link.adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_1;
201+
}
199202

200203
schedule_delayed_work(&hdcp_w->property_validate_dwork,
201204
msecs_to_jiffies(DRM_HDCP_CHECK_PERIOD_MS));
@@ -263,7 +266,7 @@ static void event_callback(struct work_struct *work)
263266

264267
mutex_lock(&hdcp_work->mutex);
265268

266-
cancel_delayed_work(&hdcp_work->watchdog_timer_dwork);
269+
cancel_delayed_work(&hdcp_work->callback_dwork);
267270

268271
mod_hdcp_process_event(&hdcp_work->hdcp, MOD_HDCP_EVENT_CALLBACK,
269272
&hdcp_work->output);
@@ -344,6 +347,8 @@ static void event_watchdog_timer(struct work_struct *work)
344347

345348
mutex_lock(&hdcp_work->mutex);
346349

350+
cancel_delayed_work(&hdcp_work->watchdog_timer_dwork);
351+
347352
mod_hdcp_process_event(&hdcp_work->hdcp,
348353
MOD_HDCP_EVENT_WATCHDOG_TIMEOUT,
349354
&hdcp_work->output);
@@ -414,7 +419,8 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
414419
link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
415420
link->dp.mst_supported = config->mst_supported;
416421
display->adjust.disable = 1;
417-
link->adjust.auth_delay = 2;
422+
link->adjust.auth_delay = 3;
423+
link->adjust.hdcp1.disable = 0;
418424

419425
hdcp_update_display(hdcp_work, link_index, aconnector, DRM_MODE_HDCP_CONTENT_TYPE0, false);
420426
}

0 commit comments

Comments
 (0)