Re: [PATCH AUTOSEL 5.4 003/205] drm/v3d: don't leak bin job if v3d_job_init fails.

2020-01-16 Thread Iago Toral
Hi Sasha, please notice that there were two separate patches that addressed the same issue and applying both simultaneously leads to a double free (which is what I see is happening with this patch: see the second call to kfree(bin) right below the one added here). This issue was raised previously

Re: [PATCH v2 4/4] drm/simple-kms: Let DRM core send VBLANK events by default

2020-01-16 Thread Thomas Zimmermann
Hi Am 17.01.20 um 00:59 schrieb Daniel Vetter: > On Thu, Jan 16, 2020 at 05:22:34PM +, Emil Velikov wrote: >> Hi all, >> >> On Thu, 16 Jan 2020 at 07:37, Thomas Zimmermann wrote: >> diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c >

[radeon-alex:amd-19.50 1962/2704] include/kcl/kcl_drm.h:191:9: error: too few arguments to function 'drm_encoder_init'

2020-01-16 Thread kbuild test robot
Hi Yifan, FYI, the error/warning still remains. tree: git://people.freedesktop.org/~agd5f/linux.git amd-19.50 head: 1f30c089d757f6d88703676d913f06d8a5ef4353 commit: 35781c0b8d19ed0d1bdb8cfa85780841ea7985ff [1962/2704] drm/amdkcl: Test whether drm_encoder_init() wants name config: i386-allyes

[PATCH v2 0/1] Take SST-only branch device into account

2020-01-16 Thread Wayne Lin
Noticed this while testing 4 ports MST hub from StarTech.com. While plugging in and display a MST monitor(Dell U2417H), change the MST feature to off from OSD. Monitor then can't display anymore. After analyzing, found out that the CSN reports the specific port from Device with MST Branching Unit

[PATCH v2 1/1] drm/dp_mst: Handle SST-only branch device case

2020-01-16 Thread Wayne Lin
[Why] While handling LINK_ADDRESS reply, current code expects a peer device can handle sideband message once the peer device type is reported as DP_PEER_DEVICE_MST_BRANCHING. However, when the connected device is a SST branch case, it can't handle the sideband message(MST_CAP=0 in DPCD 00021h). Cu

Re: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include

2020-01-16 Thread Zhenyu Wang
On 2020.01.16 15:13:01 +0100, Julian Stecklina wrote: > Hi Greg, Christoph, > > On Wed, 2020-01-15 at 16:22 +0100, Greg KH wrote: > > On Thu, Jan 09, 2020 at 07:13:57PM +0200, Julian Stecklina wrote: > > > Now that the GVT interface to hypervisors does not depend on i915/GVT > > > internals anymor

[PATCH 2/4] drm/mst: Some style improvements in drm_dp_mst_topology_mgr_set_mst()

2020-01-16 Thread José Roberto de Souza
Removing this lose code block and removing unnecessary bracket. Cc: Lyude Paul Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/d

[PATCH 1/4] drm/mst: Don't do atomic checks over disabled managers

2020-01-16 Thread José Roberto de Souza
When a main MST port is disconnected drivers should call drm_dp_mst_topology_mgr_set_mst() disabling the MST manager, this function will set manager mst_primary to NULL and it will cause the crash bellow on the next atomic check when trying to access mst_primary->port. As there is no use in runnin

[PATCH 4/4] drm/i915/display: Set TRANS_DDI_MODE_SELECT to default value when disabling TRANS_DDI

2020-01-16 Thread José Roberto de Souza
TGL timeouts when disabling MST transcoder and fifo underruns over MST transcoders are fixed when setting TRANS_DDI_MODE_SELECT to 0(HDMI mode) during the disable sequence. Although BSpec disable sequence don't require this step it is a harmless change and it is also done by Windows driver. Anyhow

[PATCH 3/4] drm/i915/display: Remove useless call intel_dp_mst_encoder_cleanup()

2020-01-16 Thread José Roberto de Souza
This is a eDP function and it will always returns true for non-eDP ports. Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_dp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 4

[pull] amdgpu, amdkfd, scheduler drm-next-5.6

2020-01-16 Thread Alex Deucher
Hi Dave, Daniel, Last pull for 5.6. Mostly bug fixes. The following changes since commit 688486a49cf500a193dfe15be9eb5aa468887769: Merge tag 'amd-drm-next-5.6-2020-01-10-dp-mst-dsc' of git://people.freedesktop.org/~agd5f/linux into drm-next (2020-01-13 17:14:34 +1000) are available in the

[RFC PATCH v3 1/2] drm/i915: Add mechanism to submit a context WA on ring submission

2020-01-16 Thread Akeem G Abodunrin
From: Mika Kuoppala NOTE: This series is in active development and is not intended to be merged to mainline in its current form. The intent of the RFC is simply to outline the strategy for the mitigation, as a focus for active discussion, and to openly share progress. There has been onl

[RFC PATCH v3 0/2] Security mitigation for Intel Gen7 HWs

2020-01-16 Thread Akeem G Abodunrin
NOTE: This series is in active development and is not intended to be merged to mainline in its current form. The intent of the RFC is simply to outline the strategy for the mitigation, as a focus for active discussion, and to openly share progress. There has been only minimal attention pa

[RFC PATCH v3 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

2020-01-16 Thread Akeem G Abodunrin
From: Prathap Kumar Valsan NOTE: This series is in active development and is not intended to be merged to mainline in its current form. The intent of the RFC is simply to outline the strategy for the mitigation, as a focus for active discussion, and to openly share progress. There has b

Re: [PATCH v2 4/4] drm/simple-kms: Let DRM core send VBLANK events by default

2020-01-16 Thread Daniel Vetter
On Thu, Jan 16, 2020 at 05:22:34PM +, Emil Velikov wrote: > Hi all, > > On Thu, 16 Jan 2020 at 07:37, Thomas Zimmermann wrote: > > > > diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c > > > b/drivers/gpu/drm/drm_atomic_state_helper.c > > > index 7cf3cf936547..23d2f51fc1d4 100644 > > >

[PATCH v2] drm/msm: Add syncobj support.

2020-01-16 Thread Bas Nieuwenhuizen
This 1) Enables core DRM syncobj support. 2) Adds options to the submission ioctl to wait/signal syncobjs. Just like the wait fence fd, this does inline waits. Using the scheduler would be nice but I believe it is out of scope for this work. Support for timeline syncobjs is implemented and the i

[PATCH v7 4/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

2020-01-16 Thread Jyri Sarha
This patch adds a new DRM driver for Texas Instruments DSS IPs used on Texas Instruments Keystone K2G, AM65x, and J721e SoCs. The new DSS IP is a major change to the older DSS IP versions, which are supported by the omapdrm driver. While on higher level the Keystone DSS resembles the older DSS vers

[PATCH v3 5/5] drm/i915: Auto detect DPCD backlight support by default

2020-01-16 Thread Lyude Paul
Turns out we actually already have some companies, such as Lenovo, shipping machines with AMOLED screens that don't allow controlling the backlight through the usual PWM interface and only allow controlling it through the standard EDP DPCD interface. One example of one of these laptops is the X1 Ex

[PATCH v3 4/5] drm/i915: Don't use VBT for detecting DPCD backlight controls

2020-01-16 Thread Lyude Paul
Despite the fact that the VBT appears to have a field for specifying that a system is equipped with a panel that supports standard VESA backlight controls over the DP AUX channel, so far every system we've spotted DPCD backlight control support on doesn't actually set this field correctly and all h

[PATCH v3 3/5] drm/i915: Fix DPCD register order in intel_dp_aux_enable_backlight()

2020-01-16 Thread Lyude Paul
For eDP panels, it appears it's expected that so long as the panel is in DPCD control mode that the brightness value is never set to 0. Instead, if the desired effect is to set the panel's backlight to 0 we're expected to simply turn off the backlight through the DP_EDP_DISPLAY_CONTROL_REGISTER. W

[PATCH v3 0/5] drm/i915: eDP DPCD aux backlight fixes

2020-01-16 Thread Lyude Paul
I recently got a ThinkPad X1 Extreme 2nd Generation for fixing some issues on, and noticed that out of the box the backlight doesn't work. Along the way of fixing that, I found a few issues with how i915 handles DPCD AUX backlight control and fixed them. Now I've got working backlight controls, hoo

[PATCH v3 1/5] drm/i915: Fix eDP DPCD aux max backlight calculations

2020-01-16 Thread Lyude Paul
Max backlight value for the panel was being calculated using byte count i.e. 0x if 2 bytes are supported for backlight brightness and 0xff if 1 byte is supported. However, EDP_PWMGEN_BIT_COUNT determines the number of active control bits used for the brightness setting. Thus, even if the panel

[PATCH v3 2/5] drm/i915: Assume 100% brightness when not in DPCD control mode

2020-01-16 Thread Lyude Paul
Currently we always determine the initial panel brightness level by simply reading the value from DP_EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB. This seems wrong though, because if the panel is not currently in DPCD control mode there's not really any reason why there would be any brightness value programmed

[PATCH v7 3/5] dt-bindings: display: ti, j721e-dss: Add dt-schema yaml binding

2020-01-16 Thread Jyri Sarha
Add dt-schema yaml bindig for J721E DSS, J721E version TI Keystone Display SubSystem. Version history: v2: no change v3: - reg-names: "wp" -> "wb" - Add ports node - Add includes to dts example - reindent dts example v4: - Add descriptions to reg, clocks, and interrups properties

[PATCH v7 1/5] dt-bindings: display: ti, k2g-dss: Add dt-schema yaml binding

2020-01-16 Thread Jyri Sarha
Add dt-schema yaml bindig for K2G DSS, an ultra-light version of TI Keystone Display SubSystem. Version history: v2: no change v3: - Add ports node - Add includes to dts example - reindent dts example v4: - Add descriptions to reg and clocks properties - Remove minItems when its val

[PATCH v7 5/5] MAINTAINERS: add entry for tidss

2020-01-16 Thread Jyri Sarha
Add entry for tidss DRM driver. Version history: v2: no change v3: - Move tidss entry after omapdrm - Add "T: git git://anongit.freedesktop.org/drm/drm-misc" v4: no change v5: no change v6: no change v7: no change Signed-off-by: Jyri Sarha --- MAINTAINERS | 11 +++ 1 file

[PATCH v7 2/5] dt-bindings: display: ti, am65x-dss: Add dt-schema yaml binding

2020-01-16 Thread Jyri Sarha
Add dt-schema yaml bindig for AM65x DSS, AM65x version TI Keystone Display SubSystem. Version history: v2: no change v3: - Add ports node - use allOf in ti,am65x-oldi-io-ctrl to add both $ref and maxItems - Add includes to dts example - reindent dts example v4: - Add descriptions to

[PATCH v7 0/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

2020-01-16 Thread Jyri Sarha
Changes since v6: - Rebase on top of drm-misc-next-2020-01-10 - Fix all checkpatch.pl -q --emacs --strict --show-types issues - all issues but these have been fixed: - over 80 char lines in scale coefficients found in tidss_scale_coefs.c - Co-developed-by and Signed-off-by: name/email do

Re: [PATCH v12 04/22] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2020-01-16 Thread John Hubbard
On 1/16/20 1:37 AM, Christoph Hellwig wrote: On Wed, Jan 15, 2020 at 01:19:41PM -0800, John Hubbard wrote: On 1/15/20 7:23 AM, Christoph Hellwig wrote: ... I'm really not sold on this scheme. Note that I think it is particularly bad, but it also doesn't seem any better than what we had before

Re: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include

2020-01-16 Thread Greg KH
On Thu, Jan 16, 2020 at 04:05:22PM +0100, Julian Stecklina wrote: > Hi Greg, > > On Thu, 2020-01-16 at 15:23 +0100, Greg KH wrote: > > On Thu, Jan 16, 2020 at 03:13:01PM +0100, Julian Stecklina wrote: > > > Hi Greg, Christoph, > > > > > > On Wed, 2020-01-15 at 16:22 +0100, Greg KH wrote: > > > >

Re: [RFC PATCH v2 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

2020-01-16 Thread Chris Wilson
Quoting Akeem G Abodunrin (2020-01-14 17:45:48) > diff --git a/drivers/gpu/drm/i915/gt/gen7_renderclear.h > b/drivers/gpu/drm/i915/gt/gen7_renderclear.h > new file mode 100644 > index ..4b88dd8d0fd4 > --- /dev/null > +++ b/drivers/gpu/drm/i915/gt/gen7_renderclear.h > @@ -0,0 +1,16 @@ >

[PATCH AUTOSEL 4.4 172/174] drm/radeon: fix bad DMA from INTERRUPT_CNTL2

2020-01-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 62d91dd2851e8ae2ca552f1b090a3575a4edf759 ] The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 g

[PATCH AUTOSEL 4.4 148/174] drm/msm/dsi: Implement reset correctly

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit 78e31c42261779a01bc73472d0f65f15378e9de3 ] On msm8998, vblank timeouts are observed because the DSI controller is not reset properly, which ends up stalling the MDP. This is because the reset logic is not correct per the hardware documentation. The document

[PATCH AUTOSEL 4.4 101/174] drm/msm/mdp5: Fix mdp5_cfg_init error return

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit fc19cbb785d7bbd1a1af26229b5240a3ab332744 ] If mdp5_cfg_init fails because of an unknown major version, a null pointer dereference occurs. This is because the caller of init expects error pointers, but init returns NULL on error. Fix this by returning the ex

[PATCH AUTOSEL 4.4 105/174] drm/msm/a3xx: remove TPL1 regs from snapshot

2020-01-16 Thread Sasha Levin
From: Rob Clark [ Upstream commit f47bee2ba447bebc304111c16ef1e1a73a9744dd ] These regs are write-only, and the hw throws a hissy-fit (ie. reboots) when we try to read them for GPU state snapshot, in response to a GPU hang. It is rather impolite when GPU recovery triggers an insta- reboot, so l

[PATCH AUTOSEL 4.4 092/174] backlight: lm3630a: Return 0 on success in update_status functions

2020-01-16 Thread Sasha Levin
From: Brian Masney [ Upstream commit d3f48ec0954c6aac736ab21c34a35d7554409112 ] lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() both return the brightness value if the brightness was successfully updated. Writing to these attributes via sysfs would cause a 'Bad address' error t

[PATCH AUTOSEL 4.4 049/174] drm/nouveau/pmu: don't print reply values if exec is false

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually upda

[PATCH AUTOSEL 4.4 041/174] fbdev: chipsfb: remove set but not used variable 'size'

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 8e71fa5e4d86bedfd26df85381d65d6b4c860020 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/fbdev/chipsfb.c:352:22: warning: variable 'size' set but not used [-Wunused-but-set-variable

[PATCH AUTOSEL 4.4 048/174] drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 13649101a25c53c87f4ab98a076dfe61f3636ab1 ] Currently, the expression for calculating RON is always going to result in zero no matter the value of ram->mr[1] because the ! operator has higher precedence than the shift >> operator. I believe the missing pare

[PATCH AUTOSEL 4.4 008/174] drm/dp_mst: Skip validating ports during destruction, just ref

2020-01-16 Thread Sasha Levin
From: Lyude Paul [ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ] Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago. Pretend we have a topology like this: |- DP-1: mst_primary |- DP-4: active display |- DP-

[PATCH AUTOSEL 4.4 001/174] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ] This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is of

[PATCH AUTOSEL 4.9 248/251] drm/radeon: fix bad DMA from INTERRUPT_CNTL2

2020-01-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 62d91dd2851e8ae2ca552f1b090a3575a4edf759 ] The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 g

[PATCH AUTOSEL 4.9 217/251] drm/msm/dsi: Implement reset correctly

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit 78e31c42261779a01bc73472d0f65f15378e9de3 ] On msm8998, vblank timeouts are observed because the DSI controller is not reset properly, which ends up stalling the MDP. This is because the reset logic is not correct per the hardware documentation. The document

[PATCH AUTOSEL 4.9 153/251] drm/msm/mdp5: Fix mdp5_cfg_init error return

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit fc19cbb785d7bbd1a1af26229b5240a3ab332744 ] If mdp5_cfg_init fails because of an unknown major version, a null pointer dereference occurs. This is because the caller of init expects error pointers, but init returns NULL on error. Fix this by returning the ex

[PATCH AUTOSEL 4.9 158/251] drm/msm/a3xx: remove TPL1 regs from snapshot

2020-01-16 Thread Sasha Levin
From: Rob Clark [ Upstream commit f47bee2ba447bebc304111c16ef1e1a73a9744dd ] These regs are write-only, and the hw throws a hissy-fit (ie. reboots) when we try to read them for GPU state snapshot, in response to a GPU hang. It is rather impolite when GPU recovery triggers an insta- reboot, so l

[PATCH AUTOSEL 4.9 141/251] backlight: lm3630a: Return 0 on success in update_status functions

2020-01-16 Thread Sasha Levin
From: Brian Masney [ Upstream commit d3f48ec0954c6aac736ab21c34a35d7554409112 ] lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() both return the brightness value if the brightness was successfully updated. Writing to these attributes via sysfs would cause a 'Bad address' error t

[PATCH AUTOSEL 4.9 081/251] drm/nouveau/pmu: don't print reply values if exec is false

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually upda

[PATCH AUTOSEL 4.9 080/251] drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 13649101a25c53c87f4ab98a076dfe61f3636ab1 ] Currently, the expression for calculating RON is always going to result in zero no matter the value of ram->mr[1] because the ! operator has higher precedence than the shift >> operator. I believe the missing pare

[PATCH AUTOSEL 4.9 063/251] fbdev: chipsfb: remove set but not used variable 'size'

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 8e71fa5e4d86bedfd26df85381d65d6b4c860020 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/fbdev/chipsfb.c:352:22: warning: variable 'size' set but not used [-Wunused-but-set-variable

[PATCH AUTOSEL 4.9 002/251] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ] This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is of

[PATCH AUTOSEL 4.9 012/251] drm/dp_mst: Skip validating ports during destruction, just ref

2020-01-16 Thread Sasha Levin
From: Lyude Paul [ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ] Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago. Pretend we have a topology like this: |- DP-1: mst_primary |- DP-4: active display |- DP-

[PATCH AUTOSEL 4.9 001/251] drm/sti: do not remove the drm_bridge that was never added

2020-01-16 Thread Sasha Levin
From: Peter Rosin [ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ] Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken. The more natural approach would perhaps be to add a drm_bridge_add, but

[PATCH AUTOSEL 4.14 363/371] drm/radeon: fix bad DMA from INTERRUPT_CNTL2

2020-01-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 62d91dd2851e8ae2ca552f1b090a3575a4edf759 ] The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 g

[PATCH AUTOSEL 4.14 322/371] drm/msm/dsi: Implement reset correctly

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit 78e31c42261779a01bc73472d0f65f15378e9de3 ] On msm8998, vblank timeouts are observed because the DSI controller is not reset properly, which ends up stalling the MDP. This is because the reset logic is not correct per the hardware documentation. The document

[PATCH AUTOSEL 4.14 230/371] drm/msm/mdp5: Fix mdp5_cfg_init error return

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit fc19cbb785d7bbd1a1af26229b5240a3ab332744 ] If mdp5_cfg_init fails because of an unknown major version, a null pointer dereference occurs. This is because the caller of init expects error pointers, but init returns NULL on error. Fix this by returning the ex

[PATCH AUTOSEL 4.14 236/371] drm/msm/a3xx: remove TPL1 regs from snapshot

2020-01-16 Thread Sasha Levin
From: Rob Clark [ Upstream commit f47bee2ba447bebc304111c16ef1e1a73a9744dd ] These regs are write-only, and the hw throws a hissy-fit (ie. reboots) when we try to read them for GPU state snapshot, in response to a GPU hang. It is rather impolite when GPU recovery triggers an insta- reboot, so l

[PATCH AUTOSEL 4.14 202/371] backlight: lm3630a: Return 0 on success in update_status functions

2020-01-16 Thread Sasha Levin
From: Brian Masney [ Upstream commit d3f48ec0954c6aac736ab21c34a35d7554409112 ] lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() both return the brightness value if the brightness was successfully updated. Writing to these attributes via sysfs would cause a 'Bad address' error t

[PATCH AUTOSEL 4.14 153/371] spi: tegra114: configure dma burst size to fifo trig level

2020-01-16 Thread Sasha Levin
From: Sowjanya Komatineni [ Upstream commit f4ce428c41fb22e3ed55496dded94df44cb920fa ] Fixes: Configure DMA burst size to be same as SPI TX/RX trigger levels to avoid mismatch. SPI FIFO trigger levels are calculated based on the transfer length. So this patch moves DMA slave configuration to ha

[PATCH AUTOSEL 4.14 111/371] drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 13649101a25c53c87f4ab98a076dfe61f3636ab1 ] Currently, the expression for calculating RON is always going to result in zero no matter the value of ram->mr[1] because the ! operator has higher precedence than the shift >> operator. I believe the missing pare

[PATCH AUTOSEL 4.14 112/371] drm/nouveau/pmu: don't print reply values if exec is false

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually upda

[PATCH AUTOSEL 4.14 089/371] fbdev: chipsfb: remove set but not used variable 'size'

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 8e71fa5e4d86bedfd26df85381d65d6b4c860020 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/fbdev/chipsfb.c:352:22: warning: variable 'size' set but not used [-Wunused-but-set-variable

[PATCH AUTOSEL 4.14 092/371] drm/etnaviv: potential NULL dereference

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 9e05352340d3a3e68c144136db9810b26ebb88c3 ] The etnaviv_gem_prime_get_sg_table() is supposed to return error pointers. Otherwise it can lead to a NULL dereference when it's called from drm_gem_map_dma_buf(). Fixes: 5f4a4a73f437 ("drm/etnaviv: fix gem_prime_

Re: [PATCH v2 4/4] drm/simple-kms: Let DRM core send VBLANK events by default

2020-01-16 Thread Emil Velikov
Hi all, On Thu, 16 Jan 2020 at 07:37, Thomas Zimmermann wrote: > > diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c > > b/drivers/gpu/drm/drm_atomic_state_helper.c > > index 7cf3cf936547..23d2f51fc1d4 100644 > > --- a/drivers/gpu/drm/drm_atomic_state_helper.c > > +++ b/drivers/gpu/drm/drm

[PATCH AUTOSEL 4.14 053/371] drm/shmob: Fix return value check in shmob_drm_probe

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 06c3bbd3c12737a50c2e981821b5585e1786e73d ] In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 8f1597c8f1a5 ("drm: shmobile: Perform i

[PATCH AUTOSEL 4.14 014/371] drm/sun4i: hdmi: Fix double flag assignation

2020-01-16 Thread Sasha Levin
From: Maxime Ripard [ Upstream commit 1e0ff648940e603cab6c52cf3723017d30d78f30 ] The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it se

[PATCH AUTOSEL 4.14 006/371] drm/hisilicon: hibmc: Don't overwrite fb helper surface depth

2020-01-16 Thread Sasha Levin
From: John Garry [ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ] Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination. This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for

[PATCH AUTOSEL 4.14 001/371] drm/sti: do not remove the drm_bridge that was never added

2020-01-16 Thread Sasha Levin
From: Peter Rosin [ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ] Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken. The more natural approach would perhaps be to add a drm_bridge_add, but

[PATCH AUTOSEL 4.14 019/371] drm/dp_mst: Skip validating ports during destruction, just ref

2020-01-16 Thread Sasha Levin
From: Lyude Paul [ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ] Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago. Pretend we have a topology like this: |- DP-1: mst_primary |- DP-4: active display |- DP-

[PATCH AUTOSEL 4.14 002/371] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ] This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is of

[PATCH AUTOSEL 4.19 659/671] drm/radeon: fix bad DMA from INTERRUPT_CNTL2

2020-01-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 62d91dd2851e8ae2ca552f1b090a3575a4edf759 ] The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 g

[PATCH AUTOSEL 4.19 610/671] drm: panel-lvds: Potential Oops in probe error handling

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit fb2ee9bf084bcaeff1e5be100decc0eacb4af2d5 ] The "lvds->backlight" pointer could be NULL in situations where of_parse_phandle() returns NULL. This code is cleaner if we use the managed devm_of_find_backlight() so the clean up is automatic. Fixes: 7c9dff5bd64

[PATCH AUTOSEL 4.19 595/671] drm/msm/dsi: Implement reset correctly

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit 78e31c42261779a01bc73472d0f65f15378e9de3 ] On msm8998, vblank timeouts are observed because the DSI controller is not reset properly, which ends up stalling the MDP. This is because the reset logic is not correct per the hardware documentation. The document

[PATCH AUTOSEL 4.19 496/671] drm: rcar-du: lvds: Fix bridge_to_rcar_lvds

2020-01-16 Thread Sasha Levin
From: Fabrizio Castro [ Upstream commit 0b936e6122738f4cf474d1f3ff636cba0edc8b94 ] Using name "bridge" for macro bridge_to_rcar_lvds argument doesn't work when the pointer name used by the caller is not "bridge". Rename the argument to "b" to allow for any pointer name. While at it, fix the con

[PATCH AUTOSEL 4.19 465/671] drm/panel: make drm_panel.h self-contained

2020-01-16 Thread Sasha Levin
From: Jani Nikula [ Upstream commit bf3f5e98559360661a3d2af340d46522512c0b00 ] Fix build warning if drm_panel.h is built with CONFIG_OF=n or CONFIG_DRM_PANEL=n and included without the prerequisite err.h: ./include/drm/drm_panel.h: In function ‘of_drm_find_panel’: ./include/drm/drm_panel.h:203:

[PATCH AUTOSEL 4.19 430/671] drm/msm/a3xx: remove TPL1 regs from snapshot

2020-01-16 Thread Sasha Levin
From: Rob Clark [ Upstream commit f47bee2ba447bebc304111c16ef1e1a73a9744dd ] These regs are write-only, and the hw throws a hissy-fit (ie. reboots) when we try to read them for GPU state snapshot, in response to a GPU hang. It is rather impolite when GPU recovery triggers an insta- reboot, so l

[PATCH AUTOSEL 4.19 419/671] drm/msm/mdp5: Fix mdp5_cfg_init error return

2020-01-16 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit fc19cbb785d7bbd1a1af26229b5240a3ab332744 ] If mdp5_cfg_init fails because of an unknown major version, a null pointer dereference occurs. This is because the caller of init expects error pointers, but init returns NULL on error. Fix this by returning the ex

[PATCH AUTOSEL 4.19 438/671] backlight: pwm_bl: Fix heuristic to determine number of brightness levels

2020-01-16 Thread Sasha Levin
From: Matthias Kaehlcke [ Upstream commit 73fbfc499448455f1e1c77717040e09e25f1d976 ] With commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") the number of set bits (aka hweight()) in the PWM period is used in the heuristic to determine the number of bright

[PATCH AUTOSEL 4.19 356/671] backlight: lm3630a: Return 0 on success in update_status functions

2020-01-16 Thread Sasha Levin
From: Brian Masney [ Upstream commit d3f48ec0954c6aac736ab21c34a35d7554409112 ] lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() both return the brightness value if the brightness was successfully updated. Writing to these attributes via sysfs would cause a 'Bad address' error t

[PATCH AUTOSEL 4.19 281/671] drm/vmwgfx: Remove set but not used variable 'restart'

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit b2130cca9c8db5073b71d832da2a6c8311a8f3bb ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_work_func': drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:514:7: warning: variable 'restart' set but not used [-

[PATCH AUTOSEL 4.19 275/671] drm/fb-helper: generic: Call drm_client_add() after setup is done

2020-01-16 Thread Sasha Levin
From: Noralf Trønnes [ Upstream commit 6e3f17ee73f7e3c2ef0e2c8fd8624b2ece8ef2c9 ] Hotplug can happen while drm_fbdev_generic_setup() is running so move drm_client_add() call after setup is done to avoid drm_fbdev_client_hotplug() running in two threads at the same time. Fixes: 9060d7f49376 ("dr

[PATCH AUTOSEL 4.19 270/671] spi: tegra114: configure dma burst size to fifo trig level

2020-01-16 Thread Sasha Levin
From: Sowjanya Komatineni [ Upstream commit f4ce428c41fb22e3ed55496dded94df44cb920fa ] Fixes: Configure DMA burst size to be same as SPI TX/RX trigger levels to avoid mismatch. SPI FIFO trigger levels are calculated based on the transfer length. So this patch moves DMA slave configuration to ha

[PATCH AUTOSEL 4.19 202/671] drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 13649101a25c53c87f4ab98a076dfe61f3636ab1 ] Currently, the expression for calculating RON is always going to result in zero no matter the value of ram->mr[1] because the ! operator has higher precedence than the shift >> operator. I believe the missing pare

[PATCH AUTOSEL 4.19 203/671] drm/nouveau/pmu: don't print reply values if exec is false

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually upda

[PATCH AUTOSEL 4.19 204/671] drm/nouveau: fix missing break in switch statement

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 785cf1eeafa23ec63f426d322401054d13abe2a3 ] The NOUVEAU_GETPARAM_PCI_DEVICE case is missing a break statement and falls through to the following NOUVEAU_GETPARAM_BUS_TYPE case and may end up re-assigning the getparam->value to an undesired value. Fix this by

[PATCH AUTOSEL 4.19 171/671] drm/etnaviv: potential NULL dereference

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 9e05352340d3a3e68c144136db9810b26ebb88c3 ] The etnaviv_gem_prime_get_sg_table() is supposed to return error pointers. Otherwise it can lead to a NULL dereference when it's called from drm_gem_map_dma_buf(). Fixes: 5f4a4a73f437 ("drm/etnaviv: fix gem_prime_

[PATCH AUTOSEL 4.19 152/671] drm/xen-front: Fix mmap attributes for display buffers

2020-01-16 Thread Sasha Levin
From: Oleksandr Andrushchenko [ Upstream commit 24ded292a5c2ed476f01c77fee65f8320552cd27 ] When GEM backing storage is allocated those are normal pages, so there is no point using pgprot_writecombine while mmaping. This fixes mismatch of buffer pages' memory attributes between the frontend and b

[PATCH AUTOSEL 4.19 166/671] fbdev: chipsfb: remove set but not used variable 'size'

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 8e71fa5e4d86bedfd26df85381d65d6b4c860020 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/fbdev/chipsfb.c:352:22: warning: variable 'size' set but not used [-Wunused-but-set-variable

[PATCH AUTOSEL 4.19 106/671] drm/fb-helper: generic: Fix setup error path

2020-01-16 Thread Sasha Levin
From: Noralf Trønnes [ Upstream commit 6e1490cf439aa86b104e5124c36275b964238e1f ] If register_framebuffer() fails during fbdev setup we will leak the framebuffer, the GEM buffer and the shadow buffer for defio. This is because drm_fb_helper_fbdev_setup() just calls drm_fb_helper_fini() on error

[PATCH AUTOSEL 4.19 102/671] drm: Fix error handling in drm_legacy_addctx

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit c39191feed4540fed98badeb484833dcf659bb96 ] 'ctx->handle' is unsigned, it never less than zero. This patch use int 'tmp_handle' to handle the err condition. Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr") Signed-off-by: YueHaibing Signed

[PATCH AUTOSEL 4.19 105/671] drm/etnaviv: fix some off by one bugs

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit f5fd9fd4000984f19db689282054953981a50534 ] The ->nr_signal is the supposed to be the number of elements in the ->signal array. There was one place where it was 5 but it was supposed to be 4. That looks like a copy and paste bug. There were also two checks

[PATCH AUTOSEL 4.19 111/671] drm/shmob: Fix return value check in shmob_drm_probe

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 06c3bbd3c12737a50c2e981821b5585e1786e73d ] In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 8f1597c8f1a5 ("drm: shmobile: Perform i

[PATCH AUTOSEL 4.19 041/671] drm/sun4i: hdmi: Fix double flag assignation

2020-01-16 Thread Sasha Levin
From: Maxime Ripard [ Upstream commit 1e0ff648940e603cab6c52cf3723017d30d78f30 ] The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it se

[PATCH AUTOSEL 4.19 056/671] drm/dp_mst: Skip validating ports during destruction, just ref

2020-01-16 Thread Sasha Levin
From: Lyude Paul [ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ] Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago. Pretend we have a topology like this: |- DP-1: mst_primary |- DP-4: active display |- DP-

[PATCH AUTOSEL 4.19 054/671] drm: rcar-du: Fix vblank initialization

2020-01-16 Thread Sasha Levin
From: Laurent Pinchart [ Upstream commit 3d61fe5f59dd3e6f96fc0772156d257cb04dc656 ] The drm_vblank_init() takes the total number of CRTCs as an argument, but the rcar-du driver passes a bitmask of the CRTC indices. Fix it. Fixes: 4bf8e1962f91 ("drm: Renesas R-Car Display Unit DRM driver") Repor

Re: [Intel-gfx] [RFC PATCH v2 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

2020-01-16 Thread Ville Syrjälä
On Tue, Jan 14, 2020 at 09:45:48AM -0800, Akeem G Abodunrin wrote: > From: Prathap Kumar Valsan > > On gen7 and gen7.5 devices, there could be leftover data residuals in > EU/L3 from the retiring context. This patch introduces workaround to clear > that residual contexts, by submitting a batch bu

[PATCH AUTOSEL 4.19 053/671] drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()'

2020-01-16 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit 4d486f18d91b1876040bf87e9ad78981a08b15a6 ] We return 0 unconditionally in 'rcar_du_crtc_set_crc_source()'. However, 'ret' is set to some error codes if some function calls fail. Return 'ret' instead to propagate the error code. Fixes: 47a52d024e89 ("m

[PATCH AUTOSEL 4.19 027/671] drm/msm: fix unsigned comparison with less than zero

2020-01-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit dfdb3be43ef1195c491e6c3760b922acb52e3575 ] The return from the call to _mixer_stages can be a negative error code however this is being assigned to an unsigned variable 'stages' hence the check is always false. Fix this by making 'stages' an int. Detected

[PATCH AUTOSEL 4.19 014/671] drm/hisilicon: hibmc: Don't overwrite fb helper surface depth

2020-01-16 Thread Sasha Levin
From: John Garry [ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ] Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination. This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for

[PATCH AUTOSEL 4.19 005/671] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ] This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is of

[PATCH AUTOSEL 4.19 001/671] drm/sti: do not remove the drm_bridge that was never added

2020-01-16 Thread Sasha Levin
From: Peter Rosin [ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ] Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken. The more natural approach would perhaps be to add a drm_bridge_add, but

  1   2   >