Potential NULL pointer deference in drm/amdgpu

2019-10-10 Thread Yizhuo Zhai
Hi All: drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c: The function to_amdgpu_fence() could return NULL, but callers in this file does not check the return value but directly dereference it, which seems potentially unsafe. Such callers include amdgpu_fence_get_timeline_name(),

[PATCH] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in modeset_init

2019-10-10 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c: In function modeset_init: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:458:28: warning: variable hw_cfg set but not used [-Wunused-but-set-variable] It is not used since commit 36d1364abbed ("drm/msm/mdp5:

[PATCH] drm/msm: make a5xx_show and a5xx_gpu_state_put static

2019-10-10 Thread Ben Dooks
The a5xx_show and a5xx_gpu_state_put objects are not exported outside of the file, so make them static to avoid the following warnings from sparse: drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1292:5: warning: symbol 'a5xx_gpu_state_put' was not declared. Should it be static?

Re: [PATCH] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in modeset_init

2019-10-10 Thread Bjorn Andersson
On Wed 09 Oct 07:13 PDT 2019, zhengbin wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c: In function modeset_init: > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:458:28: warning: variable hw_cfg set > but not used [-Wunused-but-set-variable] > >

[PATCH] drm/rockchip: make rockchip_gem_alloc_object static

2019-10-10 Thread Ben Dooks
The rockchip_gem_alloc_object function is not exported so make it static to avoid the following sparse warning: drivers/gpu/drm/rockchip/rockchip_drm_gem.c:297:28: warning: symbol 'rockchip_gem_alloc_object' was not declared. Should it be static? Signed-off-by: Ben Dooks --- Cc: Sandy Huang

[PATCH] drm/nouveau/core/client: make nvkm_uclient_sclass static

2019-10-10 Thread Ben Dooks
The nvkm_uclient_sclass object is not used outside the file it is defined in, so make it static to avoid the following sparse warning: drivers/gpu/drm/nouveau/nvkm/core/client.c:64:1: warning: symbol 'nvkm_uclient_sclass' was not declared. Should it be static? Signed-off-by: Ben Dooks --- Cc:

Re: [Intel-gfx] [PATCH v7 0/3] CRTC background color

2019-10-10 Thread Daniele Castagna
On Wed, Oct 9, 2019 at 1:34 PM Matt Roper wrote: > > The previous version of this series was posted in February here: > > https://lists.freedesktop.org/archives/dri-devel/2019-February/208068.html > > Right before we merged this in February Maarten noticed that we should > be setting up

[PATCH] drm/msm/mdp5: make config variables static

2019-10-10 Thread Ben Dooks
A number of the config structs are not exported so make them static to avoid the following sparse warnings: drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:17:26: warning: symbol 'msm8x74v1_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:101:26: warning: symbol

[PATCH 1/2] drm/fb-helper: include drm/drm_fb_cma_helper.h for missing declarations

2019-10-10 Thread Ben Dooks
Include to fix the following warnings from missing declarations: drivers/gpu/drm/drm_fb_cma_helper.c:38:27: warning: symbol 'drm_fb_cma_get_gem_obj' was not declared. Should it be static? drivers/gpu/drm/drm_fb_cma_helper.c:62:12: warning: symbol 'drm_fb_cma_get_gem_addr' was not declared.

Re: [PATCH] Revert "ARM: bcm283x: Switch V3D over to using the PM driver instead of firmware."

2019-10-10 Thread Florian Fainelli
On 10/9/19 2:33 PM, Stefan Wahren wrote: > Hi Florian, > > Am 23.09.19 um 20:56 schrieb Florian Fainelli: >> >> On 9/8/2019 8:44 AM, Stefan Wahren wrote: >>> Since release of the new BCM2835 PM driver there has been several reports >>> of V3D probing issues. This is caused by timeouts during

Re: [PATCH] Revert "ARM: bcm283x: Switch V3D over to using the PM driver instead of firmware."

2019-10-10 Thread Stefan Wahren
Hi Florian, Am 23.09.19 um 20:56 schrieb Florian Fainelli: > > On 9/8/2019 8:44 AM, Stefan Wahren wrote: >> Since release of the new BCM2835 PM driver there has been several reports >> of V3D probing issues. This is caused by timeouts during powering-up the >> GRAFX PM domain: >> >>

Re: [PATCH] drm/bridge: tc358767: fix max_tu_symbol value

2019-10-10 Thread Andrzej Hajda
On 24.09.2019 15:17, Tomi Valkeinen wrote: > max_tu_symbol was programmed to TU_SIZE_RECOMMENDED - 1, which is not > what the spec says. The spec says: > > roundup ((input active video bandwidth in bytes/output active video > bandwidth in bytes) * tu_size) > > It is not quite clear what the above

Re: [PATCH V2 6/8] mdev: introduce virtio device and its device ops

2019-10-10 Thread Jason Wang
On 2019/9/25 上午7:06, Alex Williamson wrote: On Tue, 24 Sep 2019 21:53:30 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- include/linux/mdev.h| 2 +

[PATCH v4 0/8] drm/omap: OMAP_BO flags

2019-10-10 Thread Jean-Jacques Hiblot
A first version of this work had been sent by Tomi Valkeinen in may 2017 (https://www.spinics.net/lists/dri-devel/msg140663.html). This series adds a few new OMAP_BO flags to help the userspace manage situations where it needs to use lots of buffers, and would currently run out of TILER space.

[PATCH v4 8/8] drm/omap: add OMAP_BO flags to affect buffer allocation

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen On SoCs with DMM/TILER, we have two ways to allocate buffers: normal dma_alloc or via DMM (which basically functions as an IOMMU). DMM can map 128MB at a time, and we only map the DMM buffers when they are used (i.e. not at alloc time). If DMM is present, omapdrm always uses

[PATCH v4 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen omap_gem_new() has a comment about OMAP_BO_SCANOUT which does not make sense. Also, for the TILER case, we drop OMAP_BO_SCANOUT flag for some reason. It's not clear what the original purpose of OMAP_BO_SCANOUT is, but presuming it means "scanout buffer, something that can

[PATCH v4 1/8] drm/omap: use refcount API to track the number of users of dma_addr

2019-10-10 Thread Jean-Jacques Hiblot
This would give us a WARN_ON() if the pin/unpin calls are unbalanced. Proposed-by: Laurent Pinchart Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 44 +++--- 1 file changed, 22 insertions(+), 22 deletions(-)

[PATCH v4 3/8] drm/omap: accept NULL for dma_addr in omap_gem_pin

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Allow NULL to be passed in 'dma_addr' for omap_gem_pin(), in case the caller does not need the dma_addr. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- drivers/gpu/drm/omapdrm/omap_gem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH v4 4/8] drm/omap: cleanup OMAP_BO flags

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Reorder OMAP_BO flags and improve the comments. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- include/uapi/drm/omap_drm.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/uapi/drm/omap_drm.h

[PATCH v4 7/8] drm/omap: add omap_gem_validate_flags()

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Add a helper function omap_gem_validate_flags() which validates the omap_bo flags passed from the userspace. Also drop the dev_err() message, as the userspace can cause that at will. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot ---

[PATCH v4 5/8] drm/omap: remove OMAP_BO_TILED define

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen OMAP_BO_TILED does not make sense, as OMAP_BO_TILED_* values are not bitmasks but normal values. As we already have OMAP_BO_TILED_MASK for the mask, we can remove OMAP_BO_TILED and use OMAP_BO_TILED_MASK instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques

[PATCH v4 2/8] drm/omap: add omap_gem_unpin_locked()

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Add omap_gem_unpin_locked() which is a version of omap_gem_unpin() that expects the caller to hold the omap_obj lock. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- drivers/gpu/drm/omapdrm/omap_gem.c | 25 ++--- 1 file changed, 18

Re: [pull] amdgpu/kfd, radeon, ttm drm-next-5.5

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 6:17 AM Alex Deucher wrote: > > Hi Dave, Daniel, > > New stuff for 5.5. There's an export of a cgroup function that > Tejun acked for merging through the drm tree. kfd uses it to handle > permissions in containers since there is only one /dev/kfd. > > The following

Re: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

2019-10-10 Thread Dan Carpenter
This code is *so* much nicer than before. I hope you feel good about the changes. It makes me happy to look at this code now. On Thu, Oct 10, 2019 at 09:34:19AM +, Xin Ji wrote: > +static int edid_read(struct anx7625_data *ctx, > + u8 offset, u8 *pblock_buf) > +{ > +

Re: [PATCH RESEND] gpu: drm: bridge: sii9234: convert to devm_i2c_new_dummy_device

2019-10-10 Thread Andrzej Hajda
On 08.10.2019 22:33, Wolfram Sang wrote: > Move from the deprecated i2c_new_dummy() to devm_i2c_new_dummy_device(). > We now get an ERRPTR which we use in error handling and we can skip > removal of the created devices. > > Signed-off-by: Wolfram Sang > --- Applied, thx. Rergards Andrzej >

[PATCH 0/7] drm/meson: add AFBC support

2019-10-10 Thread Neil Armstrong
This adds support for the ARM Framebuffer Compression decoders found in the Amlogic GXM and G12A SoCs. The Amlogic GXM and G12A AFBC decoder are totally different, the GXM only handling only the AFBC v1.0 modes and the G12A decoder handling the AFBC v1.2 modes. The G12A AFBC decoder is an

[PATCH 4/7] drm/meson: plane: add support for AFBC mode for OSD1 plane

2019-10-10 Thread Neil Armstrong
This adds all the OSD configuration plumbing to support the AFBC decoders path to display of the OSD1 plane. The Amlogic GXM and G12A AFBC decoders are integrated very differently. The Amlogic GXM has a direct output path to the OSD1 VIU pixel input, because the GXM AFBC decoder seem to be a

[PATCH 3/7] drm/meson: Add AFBCD module driver

2019-10-10 Thread Neil Armstrong
This adds the driver for the ARM Framebuffer Compression decoders found in the Amlogic GXM and G12A SoCs. The Amlogic GXM and G12A AFBC decoder are totally different, the GXM only handling only the AFBC v1.0 modes and the G12A decoder handling the AFBC v1.2 modes. The G12A AFBC decoder is an

Re: [PATCH] drm/bridge: tc358767: fix max_tu_symbol value

2019-10-10 Thread Tomi Valkeinen
Hi Andrzej, On 10/10/2019 12:19, Andrzej Hajda wrote: On 24.09.2019 15:17, Tomi Valkeinen wrote: max_tu_symbol was programmed to TU_SIZE_RECOMMENDED - 1, which is not what the spec says. The spec says: roundup ((input active video bandwidth in bytes/output active video bandwidth in bytes) *

[PATCH 5/7] drm/meson: viu: add AFBC modules routing functions

2019-10-10 Thread Neil Armstrong
The Amlogic G12A AFBC Decoder pixel input need to be routed diferently than the Amlogic GXM AFBC decoder, this adds support for routing the VIU OSD1 pixel source to the AFBC "Mali Unpack" module. This "Mali Unpack" module is also configured with a static RGBA mapping for now until we support more

[PATCH 7/7] drm/meson: crtc: add OSD1 plane AFBC commit

2019-10-10 Thread Neil Armstrong
Finally, setup the VIU registers and start the AFBC decoder at each vsync IRQ to support displaying AFBC encoded buffers on Amlogic GXM and G12A SoCs. Since the DRM core will stop the vsync IRQ after a few interrupts, we need to keep the IRQ enabled while using the AFBC decoder. Signed-off-by:

[PATCH 1/7] drm/meson: add AFBC decoder registers for GXM and G12A

2019-10-10 Thread Neil Armstrong
Add the registers used to program the ARM Framebuffer Compression decoders used in the Amlogic GXM and G12A SoCs families. This also adds the routing and pipeline configuration bits and registers needed to enable AFBC support. Signed-off-by: Neil Armstrong ---

[PATCH 6/7] drm/meson: hold 32 lines after vsync to give time for AFBC start

2019-10-10 Thread Neil Armstrong
When using an AFBC encoded frame, the AFBC Decoder must be resetted, configured and enabled at each vsync IRQ. To leave time for that, use the maximum lines hold time to give time for AFBC setup and avoid visual glitches. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_viu.c | 2

[PATCH 2/7] drm/meson: store the framebuffer width for plane commit

2019-10-10 Thread Neil Armstrong
Also store the framebuffer width in the private common struct to be used by the AFBC decoder module driver when committing the AFBC plane. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_drv.h | 1 + drivers/gpu/drm/meson/meson_plane.c | 1 + 2 files changed, 2 insertions(+)

Re: Potential NULL pointer deference in drm/amdgpu

2019-10-10 Thread Koenig, Christian
Hi Yizhuo, Am 10.10.19 um 07:09 schrieb Yizhuo Zhai: > Hi All: > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c: > The function to_amdgpu_fence() could return NULL, but callers > in this file does not check the return value but directly dereference it, > which seems potentially unsafe. > Such callers

Re: [PATCH RESEND] gpu: drm: bridge: analogix-anx78xx: convert to i2c_new_dummy_device

2019-10-10 Thread Andrzej Hajda
On 08.10.2019 22:31, Wolfram Sang wrote: > Move from the deprecated i2c_new_dummy() to i2c_new_dummy_device(). We > now get an ERRPTR which we use in error handling. > > Signed-off-by: Wolfram Sang Brian's patch is already applied. Regards Andrzej > --- > > Rebased to v5.4-rc2 since last

Re: [PATCH] Revert "ARM: bcm283x: Switch V3D over to using the PM driver instead of firmware."

2019-10-10 Thread Stefan Wahren
On 09.10.19 23:42, Florian Fainelli wrote: > On 10/9/19 2:33 PM, Stefan Wahren wrote: >> Hi Florian, >> >> Am 23.09.19 um 20:56 schrieb Florian Fainelli: >>> On 9/8/2019 8:44 AM, Stefan Wahren wrote: Since release of the new BCM2835 PM driver there has been several reports of V3D probing

[Bug 111481] AMD Navi GPU frequent freezes on both Manjaro/Ubuntu with kernel 5.3 and mesa 19.2 -git/llvm9

2019-10-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111481 --- Comment #82 from Jaap Buurman --- Running the 5.3.5 Kernel, 19.2.0 Mesa and latest firmware in Arch's repository I am also running into the same issue: [46623.025576] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma1 timeout, signaled

[PATCH] drm/komeda: Don't flush inactive pipes

2019-10-10 Thread Mihail Atanassov
HW doesn't allow flushing inactive pipes and raises an MERR interrupt if you try to do so. Stop triggering the MERR interrupt in the middle of a commit by calling drm_atomic_helper_commit_planes with the ACTIVE_ONLY flag. Signed-off-by: Mihail Atanassov ---

Re: [PATCHv2 7/7] drm/omap: hdmi4: fix use of uninitialized var

2019-10-10 Thread Tomi Valkeinen
On 08/10/2019 17:21, Tony Lindgren wrote: * Tomi Valkeinen [191008 14:17]: On 08/10/2019 17:13, Tony Lindgren wrote: * Tomi Valkeinen [190930 10:38]: If use_mclk is false, mclk_mode is written to a register without initialization. This doesn't cause any ill effects as the written value is

Re: linux-next: build failure after merge of the tip tree

2019-10-10 Thread Ingo Molnar
* Stephen Rothwell wrote: > Hi all, > > After merging the tip tree, today's linux-next build (x86_64 allmodconfig) > failed like this: > > drivers/gpu/drm/i915/gt/intel_gt_pm.c: In function 'intel_gt_resume': > drivers/gpu/drm/i915/gt/intel_gt_pm.c:183:54: error: macro "mutex_release" >

RE: [Intel-gfx] [PATCH 8/8] drm/print: introduce new struct drm_device based logging macros

2019-10-10 Thread Jani Nikula
On Wed, 09 Oct 2019, "Ruhl, Michael J" wrote: >>-Original Message- >>From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of >>Jani Nikula >>+/* Helper for struct drm_device based logging. */ >>+#define __drm_printk(drm, level, type, fmt, ...) \

[PULL] drm-misc-fixes

2019-10-10 Thread Maxime Ripard
Hi Dave, Daniel, Here's this week drm-misc-fixes PR, dealing mostly with SPI probing related issues. Maxime drm-misc-fixes-2019-10-10: Short summary of fixes pull (less than what git shortlog provides): - SPI Aliases fixes for panels - One fix for the tc358767 bridge dealing with visual

Re: [PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver

2019-10-10 Thread Christian König
Am 09.10.19 um 17:39 schrieb Daniel Vetter: On Mon, Sep 30, 2019 at 03:12:53PM +0200, Christian König wrote: [SNIP] +static vm_fault_t nouveau_ttm_fault(struct vm_fault *vmf) +{ + struct vm_area_struct *vma = vmf->vma; + struct ttm_buffer_object *bo = vma->vm_private_data; +

[PATCH v2 0/2] Add initial support for slimport anx7625

2019-10-10 Thread Xin Ji
Hi all, The following series add initial support for the Slimport ANX7625 transmitter, a ultra-low power Full-HD 4K MIPI to DP transmitter designed for portable device. This is the initial version, any mistakes, please let me know, I will fix it in the next series. Thanks, Xin Xin Ji (2):

Re: [PATCH v4 0/8] drm/omap: OMAP_BO flags

2019-10-10 Thread Tomi Valkeinen
Hi JJ, On 10/10/2019 12:34, Jean-Jacques Hiblot wrote: A first version of this work had been sent by Tomi Valkeinen in may 2017 (https://www.spinics.net/lists/dri-devel/msg140663.html). This series adds a few new OMAP_BO flags to help the userspace manage situations where it needs to use lots

Re: [PATCH v2 1/4] drm/bridge: dw-hdmi: Add Dynamic Range and Mastering InfoFrame support

2019-10-10 Thread Neil Armstrong
On 10/10/2019 12:12, Andrzej Hajda wrote: > On 07.10.2019 21:21, Jonas Karlman wrote: >> Add support for configuring Dynamic Range and Mastering InfoFrame from >> the hdr_output_metadata connector property. >> >> This patch adds a use_drm_infoframe flag to dw_hdmi_plat_data that platform >>

Re: [PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 9:54 AM Christian König wrote: > > Am 09.10.19 um 17:39 schrieb Daniel Vetter: > > On Mon, Sep 30, 2019 at 03:12:53PM +0200, Christian König wrote: > > [SNIP] > >> +static vm_fault_t nouveau_ttm_fault(struct vm_fault *vmf) > >> +{ > >> +struct vm_area_struct *vma =

Re: [PATCH v10 4/6] dts-bindings: leds: Document the naming requirement for LED properties

2019-10-10 Thread Jean-Jacques Hiblot
On 09/10/2019 21:26, Rob Herring wrote: On Wed, Oct 09, 2019 at 10:51:25AM +0200, Jean-Jacques Hiblot wrote: LED properties must be named "leds" in the same way that PWM, clocks or PHY properties are names respectively "pwms", "clocks" and "phys". Cc: devicet...@vger.kernel.org Signed-off-by:

[PATCH] drm/scheduler: make unexported items static

2019-10-10 Thread Ben Dooks
The drm_sched_fence_ops_{scheduled,finished} are not exported from the file so make them static to avoid the following warnings from sparse: drivers/gpu/drm/scheduler/sched_fence.c:131:28: warning: symbol 'drm_sched_fence_ops_scheduled' was not declared. Should it be static?

Re: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

2019-10-10 Thread Dan Carpenter
On Thu, Oct 10, 2019 at 12:53:15PM +0300, Dan Carpenter wrote: > This code is *so* much nicer than before. I hope you feel good about > the changes. It makes me happy to look at this code now. > > On Thu, Oct 10, 2019 at 09:34:19AM +, Xin Ji wrote: > > +static int edid_read(struct

[PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver

2019-10-10 Thread Xin Ji
The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI to DP feature. This driver only enabled MIPI DSI/DPI to DP feature. Signed-off-by: Xin Ji

Re: [PATCH v2 1/4] drm/bridge: dw-hdmi: Add Dynamic Range and Mastering InfoFrame support

2019-10-10 Thread Andrzej Hajda
On 07.10.2019 21:21, Jonas Karlman wrote: > Add support for configuring Dynamic Range and Mastering InfoFrame from > the hdr_output_metadata connector property. > > This patch adds a use_drm_infoframe flag to dw_hdmi_plat_data that platform > drivers use to signal when Dynamic Range and Mastering

Re: [PATCH v4 0/8] drm/omap: OMAP_BO flags

2019-10-10 Thread Jean-Jacques Hiblot
On 10/10/2019 11:45, Tomi Valkeinen wrote: Hi JJ, On 10/10/2019 12:34, Jean-Jacques Hiblot wrote: A first version of this work had been sent by Tomi Valkeinen in may 2017 (https://www.spinics.net/lists/dri-devel/msg140663.html). This series adds a few new OMAP_BO flags to help the userspace

[PATCH v5 0/8] drm/omap: OMAP_BO flags

2019-10-10 Thread Jean-Jacques Hiblot
A first version of this work had been sent by Tomi Valkeinen in may 2017 (https://www.spinics.net/lists/dri-devel/msg140663.html). This series adds a few new OMAP_BO flags to help the userspace manage situations where it needs to use lots of buffers, and would currently run out of TILER space.

[PATCH v5 6/8] drm/omap: cleanup OMAP_BO_SCANOUT use

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen omap_gem_new() has a comment about OMAP_BO_SCANOUT which does not make sense. Also, for the TILER case, we drop OMAP_BO_SCANOUT flag for some reason. It's not clear what the original purpose of OMAP_BO_SCANOUT is, but presuming it means "scanout buffer, something that can

[PATCH v5 1/8] drm/omap: use refcount API to track the number of users of dma_addr

2019-10-10 Thread Jean-Jacques Hiblot
This would give us a WARN_ON() if the pin/unpin calls are unbalanced. Proposed-by: Laurent Pinchart Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 44 +++--- 1 file changed, 22 insertions(+), 22 deletions(-)

[PATCH v5 8/8] drm/omap: add OMAP_BO flags to affect buffer allocation

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen On SoCs with DMM/TILER, we have two ways to allocate buffers: normal dma_alloc or via DMM (which basically functions as an IOMMU). DMM can map 128MB at a time, and we only map the DMM buffers when they are used (i.e. not at alloc time). If DMM is present, omapdrm always uses

[PATCH v5 5/8] drm/omap: remove OMAP_BO_TILED define

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen OMAP_BO_TILED does not make sense, as OMAP_BO_TILED_* values are not bitmasks but normal values. As we already have OMAP_BO_TILED_MASK for the mask, we can remove OMAP_BO_TILED and use OMAP_BO_TILED_MASK instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques

[PATCH v5 7/8] drm/omap: add omap_gem_validate_flags()

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Add a helper function omap_gem_validate_flags() which validates the omap_bo flags passed from the userspace. Also drop the dev_err() message, as the userspace can cause that at will. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot ---

[PATCH v5 3/8] drm/omap: accept NULL for dma_addr in omap_gem_pin

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Allow NULL to be passed in 'dma_addr' for omap_gem_pin(), in case the caller does not need the dma_addr. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- drivers/gpu/drm/omapdrm/omap_gem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH v5 2/8] drm/omap: add omap_gem_unpin_locked()

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Add omap_gem_unpin_locked() which is a version of omap_gem_unpin() that expects the caller to hold the omap_obj lock. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- drivers/gpu/drm/omapdrm/omap_gem.c | 25 ++--- 1 file changed, 18

[PATCH v5 4/8] drm/omap: cleanup OMAP_BO flags

2019-10-10 Thread Jean-Jacques Hiblot
From: Tomi Valkeinen Reorder OMAP_BO flags and improve the comments. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot --- include/uapi/drm/omap_drm.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/uapi/drm/omap_drm.h

Re: [PATCH] drm/plane: Clarify our expectations for src/dst rectangles

2019-10-10 Thread Ville Syrjälä
On Thu, Oct 10, 2019 at 01:29:17PM +0200, Maarten Lankhorst wrote: > The rectangles are usually clipped, but it can be useful to have > them unclipped, for example for cursor planes. > > Signed-off-by: Maarten Lankhorst > --- > include/drm/drm_plane.h | 22 -- > 1 file

[Bug 111796] [CI][SHARDS] igt@gem_eio@in-flight-suspend - crash - Received signal SIGSEGV

2019-10-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111796 Chris Wilson changed: What|Removed |Added Assignee|intel-gfx-bugs@lists.freede |dri-devel@lists.freedesktop

Re: [PATCH 3/3] drm/atmel-hlcdc: Use swap() where appropriate

2019-10-10 Thread Boris Brezillon
On Thu, 10 Oct 2019 16:11:59 +0300 Ville Syrjala wrote: > From: Ville Syrjälä > > @swap@ > identifier TEMP; > expression A,B; > @@ > - TEMP = A; > - A = B; > - B = TEMP; > + swap(A, B); > > @@ > type T; > identifier swap.TEMP; > @@ > ( > - T TEMP; > | > - T TEMP = {...}; > ) > ... when !=

Re: [PATCH 1/3] drm/amd/display: Use swap() where appropriate

2019-10-10 Thread Kazlauskas, Nicholas
On 2019-10-10 9:11 a.m., Ville Syrjala wrote: > From: Ville Syrjälä > > Mostly a cocci-job, but it flat out refused to remove the > declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so > had to do that part manually. > > @swap@ > identifier TEMP; > expression A,B; > @@ > - TEMP = A; > - A

Re: [PATCH] drm/scheduler: make unexported items static

2019-10-10 Thread Alex Deucher
On Thu, Oct 10, 2019 at 2:55 AM Ben Dooks wrote: > > The drm_sched_fence_ops_{scheduled,finished} are not exported > from the file so make them static to avoid the following > warnings from sparse: > > drivers/gpu/drm/scheduler/sched_fence.c:131:28: warning: symbol >

Re: [PATCH v2 0/4] drm/bridge: dw-hdmi: Add support for HDR metadata

2019-10-10 Thread Neil Armstrong
On 07/10/2019 21:19, Jonas Karlman wrote: > Add support for HDR metadata using the hdr_output_metadata connector property, > configure Dynamic Range and Mastering InfoFrame accordingly. > > A use_drm_infoframe flag is added to dw_hdmi_plat_data that platform drivers > can use to signal when

[PATCH 1/3] drm/amd/display: Use swap() where appropriate

2019-10-10 Thread Ville Syrjala
From: Ville Syrjälä Mostly a cocci-job, but it flat out refused to remove the declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so had to do that part manually. @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ (

Re: [PATCH 4/7] drm/meson: plane: add support for AFBC mode for OSD1 plane

2019-10-10 Thread Ayan Halder
On Thu, Oct 10, 2019 at 11:25:23AM +0200, Neil Armstrong wrote: > This adds all the OSD configuration plumbing to support the AFBC decoders > path to display of the OSD1 plane. > > The Amlogic GXM and G12A AFBC decoders are integrated very differently. > > The Amlogic GXM has a direct output

Re: [1/3] drm/tinydrm/Kconfig: Remove menuconfig DRM_TINYDRM

2019-10-10 Thread Noralf Trønnes
Den 09.10.2019 15.31, skrev Maxime Ripard: > On Wed, Oct 09, 2019 at 02:48:20PM +0200, Noralf Trønnes wrote: >> Den 09.10.2019 12.45, skrev Daniel Vetter: >>> On Tue, Oct 01, 2019 at 04:07:38PM +0200, Noralf Trønnes wrote: Hi drm-misc maintainers, I have just applied a patch to

Re: [PATCH 1/6] drm/gem: refine drm_gem_objects_lookup

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 10:02:31AM +0800, Qiang Yu wrote: > On Wed, Oct 9, 2019 at 10:57 PM Daniel Vetter wrote: > > > > On Fri, Sep 27, 2019 at 08:09:52AM +0800, Qiang Yu wrote: > > > On Thu, Sep 26, 2019 at 11:01 PM Rob Herring wrote: > > > > > > > > On Thu, Sep 26, 2019 at 9:12 AM Qiang Yu

Re: [PATCH] drm/tiny: Kconfig: Remove always-y THERMAL dep. from TINYDRM_REPAPER

2019-10-10 Thread Noralf Trønnes
Den 01.10.2019 12.58, skrev Noralf Trønnes: > > > Den 27.09.2019 19.42, skrev Ulf Magnusson: >> Commit 554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's >> option") changed the type of THERMAL from tristate to bool, so >> THERMAL || !THERMAL is now always y. Remove the redundant

[PATCH] drm/ttm: fix handling in ttm_bo_add_mem_to_lru

2019-10-10 Thread Christian König
We should not add the BO to the swap LRU when the new mem is fixed and the TTM object about to be destroyed. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

Re: [PATCH] drm/plane: Clarify our expectations for src/dst rectangles

2019-10-10 Thread Ville Syrjälä
On Thu, Oct 10, 2019 at 02:46:26PM +0200, Maarten Lankhorst wrote: > Op 10-10-2019 om 14:36 schreef Ville Syrjälä: > > On Thu, Oct 10, 2019 at 01:29:17PM +0200, Maarten Lankhorst wrote: > >> The rectangles are usually clipped, but it can be useful to have > >> them unclipped, for example for

[PATCH 3/3] drm/atmel-hlcdc: Use swap() where appropriate

2019-10-10 Thread Ville Syrjala
From: Ville Syrjälä @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Sam Ravnborg Cc: Boris Brezillon Signed-off-by: Ville Syrjälä ---

[PATCH 2/3] drm/amdgpu/powerplay: Use swap() where appropriate

2019-10-10 Thread Ville Syrjala
From: Ville Syrjälä @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Rex Zhu Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou"

Re: [PATCH v2 16/24] drm/msm: dpu: Add modeset lock checks where applicable

2019-10-10 Thread Sean Paul
On Thu, Oct 10, 2019 at 12:20:56AM +0200, Daniel Vetter wrote: > On Fri, Nov 16, 2018 at 7:44 PM Sean Paul wrote: > > > > From: Sean Paul > > > > Add modeset lock checks to functions that could be called outside the > > core atomic stack. > > > > Changes in v2: > > - None > > > > Signed-off-by:

Re: linux-next: build failure after merge of the tip tree

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 10:23:21PM +1100, Stephen Rothwell wrote: > Hi Ingo, > > On Thu, 10 Oct 2019 10:02:07 +0200 Ingo Molnar wrote: > > > > I suspect -next will have to carry this semantic merge conflict > > resolution until the DRM tree is merged upstream. > > Yep, its not a real problem,

Re: [PATCH -next] drm/vkms: Remove duplicated include from vkms_drv.c

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 11:52:13AM +, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing Applied, thanks. -Daniel > --- > drivers/gpu/drm/vkms/vkms_drv.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c

[PATCH v4 1/3] drm/lima: use drm_gem_shmem_helpers

2019-10-10 Thread Qiang Yu
Do not need to maintain our own shmem memory management code as drm_gem_shmem_helpers provides it. And we can also benifit from the work of others with shared code. This is also a preparation for implementing buffer madv. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/Kconfig | 1

[PATCH v4 3/3] drm/lima: add __GFP_NOWARN flag to all dma_alloc_wc

2019-10-10 Thread Qiang Yu
This prevent CMA printing dumy "PFNs busy" info which is caused by alloc fail re-try case. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 2 +- drivers/gpu/drm/lima/lima_vm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v4 2/3] drm/lima: use drm_gem_(un)lock_reservations

2019-10-10 Thread Qiang Yu
Simplify the driver code with DRM GEM helper function. v2: improve commit comment. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_gem.c | 64 - 1 file changed, 6 insertions(+), 58 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_gem.c

Re: linux-next: build failure after merge of the tip tree

2019-10-10 Thread Stephen Rothwell
Hi Ingo, On Thu, 10 Oct 2019 10:02:07 +0200 Ingo Molnar wrote: > > I suspect -next will have to carry this semantic merge conflict > resolution until the DRM tree is merged upstream. Yep, its not a real problem, I get a few like this every cycle. -- Cheers, Stephen Rothwell

Re: [pull] ttm drm-fixes-5.4

2019-10-10 Thread Koenig, Christian
Am 09.10.19 um 09:47 schrieb Arkadiusz Hiler: > On Tue, Oct 08, 2019 at 09:13:41AM -0400, Alex Deucher wrote: >> On Tue, Oct 8, 2019 at 4:04 AM Koenig, Christian >> wrote: >>> My git version should be relative new, but I'm usually using thunderbird >>> to send pull requests not git itself since I

[Bug 111933] driconf-0.9.1-r2 - assert iter or allowNone

2019-10-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111933 mmokr...@fold.natur.cuni.cz changed: What|Removed |Added URL|

[Bug 111932] driconf: TypeError: cannot concatenate 'str' and 'int' objects

2019-10-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111932 mmokr...@fold.natur.cuni.cz changed: What|Removed |Added URL|

Re: [PATCH] drm/dp-mst: Drop connection_mutex check

2019-10-10 Thread Daniel Vetter
On Wed, Oct 09, 2019 at 06:46:38PM -0400, Lyude Paul wrote: > oh, completely forgot about this one > > Reviewed-by: Lyude Paul Thanks for your review, applied to drm-misc-next. -Daniel > > On Thu, 2019-10-10 at 00:41 +0200, Daniel Vetter wrote: > > Private atomic objects have grown their own

Re: [PATCH] drm/ttm: fix handling in ttm_bo_add_mem_to_lru

2019-10-10 Thread Wang, Kevin(Yang)
Reviewed-by: Kevin Wang Best Regards, Kevin From: Christian König Sent: Thursday, October 10, 2019 7:26 PM To: dri-devel@lists.freedesktop.org ; Wang, Kevin(Yang) ; Zhang, Hawking Subject: [PATCH] drm/ttm: fix handling in ttm_bo_add_mem_to_lru We should not

[PATCH 3/4] media: radio: wl1273: fix interrupt masking on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the radio device and the core lock is contended, release() could return early and fail to update the interrupt mask. Note that the return value of the v4l2 release file operation is ignored. Fixes: 87d1a50ce451 ("[media] V4L2: WL1273 FM Radio: TI

[PATCH 0/4] treewide: fix interrupted release

2019-10-10 Thread Johan Hovold
Two old USB drivers had a bug in them which could lead to memory leaks if an interrupted process raced with a disconnect event. Turns out we had a few more driver in other subsystems with the same kind of bug in them. Note that all but the s390 patch have only been compile tested, while the s390

[PATCH 4/4] s390/zcrypt: fix memleak at release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the crypto device and the global ap_perms_mutex is contented, release() could return early and fail to free related resources. Fixes: 00fab2350e6b ("s390/zcrypt: multiple zcrypt device nodes support") Cc: stable # 4.19 Cc: Harald Freudenberger Cc:

[PATCH 2/4] media: bdisp: fix memleak on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the video device and the device lock is contended, release() could return early and fail to free related resources. Note that the return value of the v4l2 release file operation is ignored. Fixes: 28ffeebbb7bd ("[media] bdisp: 2D blitter driver using

[PATCH 1/4] drm/msm: fix memleak on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the "gpu" debugfs file and the drm device struct_mutex is contended, release() could return early and fail to free related resources. Note that the return value from release() is ignored. Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function

[PATCH v4 0/3] drm/lima: simplify driver by using more drm helpers

2019-10-10 Thread Qiang Yu
By using shared drm helpers: 1. drm_gem_(un)lock_reservations 2. drm_gem_shmem_helpers we can simplify lima driver a lot and benifit from updates to these functions. Patch series is based on drm-misc-next branch v2: Add drm_gem_objects_lookup_user and use it for driver which pass user GEM

[PATCH -next] drm/vkms: Remove duplicated include from vkms_drv.c

2019-10-10 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/gpu/drm/vkms/vkms_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 54703463d966..d1fe144aa289 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++

Re: [PATCH] drm/plane: Clarify our expectations for src/dst rectangles

2019-10-10 Thread Maarten Lankhorst
Op 10-10-2019 om 14:36 schreef Ville Syrjälä: > On Thu, Oct 10, 2019 at 01:29:17PM +0200, Maarten Lankhorst wrote: >> The rectangles are usually clipped, but it can be useful to have >> them unclipped, for example for cursor planes. >> >> Signed-off-by: Maarten Lankhorst >> --- >>

[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII

2019-10-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #160 from ReddestDream --- Well, today I had a hard freeze using more than one display with Radeon VII. Back to Radeon VII + iGPU . . . :( -- You are receiving this mail because: You are the assignee for the

Re: [PATCH 0/4] treewide: fix interrupted release

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 03:13:29PM +0200, Johan Hovold wrote: > Two old USB drivers had a bug in them which could lead to memory leaks > if an interrupted process raced with a disconnect event. > > Turns out we had a few more driver in other subsystems with the same > kind of bug in them. > >

  1   2   >