Re: [PATCH v2 5/8] drm/amdgpu: Refactor sysfs removal

2020-06-24 Thread Andrey Grodzovsky
On 6/24/20 2:11 AM, Greg KH wrote: On Tue, Jun 23, 2020 at 11:04:30PM -0400, Andrey Grodzovsky wrote: On 6/23/20 2:05 AM, Greg KH wrote: On Tue, Jun 23, 2020 at 12:51:00AM -0400, Andrey Grodzovsky wrote: On 6/22/20 12:45 PM, Greg KH wrote: On Mon, Jun 22, 2020 at 12:07:25PM -0400, Andrey

Re: [RFC PATCH 1/2] drm/hyperv: Add DRM driver for hyperv synthetic video device

2020-06-24 Thread Deepak Rawat
> > > Thanks for the review. Unfortunately only the first vmbus message > > > take > > > effect and subsequent calls are ignored. I originally implemented > > > using > > > vram helpers but I figured out calling this vmbus message again > > > won't > > > change the vram location. > > /me

[PATCH v2 0/2] virtio: modernize DMA quirks

2020-06-24 Thread Michael S. Tsirkin
Use generic names for the quirks to make it clear it is not just about the IOMMU, it's about DMA access in general. changes from v1: added patch 2 Michael S. Tsirkin (2): virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM virtio: virtio_has_iommu_quirk ->

[PATCH v2 2/2] virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk

2020-06-24 Thread Michael S. Tsirkin
Now that the corresponding feature bit has been renamed, rename the quirk too - it's about special ways to do DMA, not necessarily about the IOMMU. Signed-off-by: Michael S. Tsirkin --- drivers/gpu/drm/virtio/virtgpu_object.c | 2 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++--

[RFC v7 11/11] drm/nouveau/kms/nvd9-: Add CRC support

2020-06-24 Thread Lyude Paul
This introduces support for CRC readback on gf119+, using the documentation generously provided to us by Nvidia: https://github.com/NVIDIA/open-gpu-doc/blob/master/Display-CRC/display-crc.txt We expose all available CRC sources. SF, SOR, PIOR, and DAC are exposed through a single set of "outp"

[RFC v7 10/11] drm/nouveau/kms/nv50-: Move hard-coded object handles into header

2020-06-24 Thread Lyude Paul
While most of the functionality on Nvidia GPUs doesn't require using an explicit handle instead of the main VRAM handle + offset, there are a couple of places that do require explicit handles, such as CRC functionality. Since this means we're about to add another nouveau-chosen handle, let's just

[RFC v7 06/11] drm/nouveau/kms/nv50-: Fix disabling dithering

2020-06-24 Thread Lyude Paul
While we expose the ability to turn off hardware dithering for nouveau, we actually make the mistake of turning it on anyway, due to dithering_depth containing a non-zero value if our dithering depth isn't also set to 6 bpc. So, fix it by never enabling dithering when it's disabled.

[RFC v7 05/11] drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit

2020-06-24 Thread Lyude Paul
Currently, we modify the depth value stored in the atomic state when performing a commit in order to workaround the fact we haven't implemented support for depths higher then 10 yet. This isn't idempotent though, as it will happen every atomic commit where we modify the OR state even if the head's

[RFC v7 02/11] drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off()

2020-06-24 Thread Lyude Paul
This got me confused for a bit while looking over this code: I had been planning on adding some blocking function calls into this function, but seeing the irqsave/irqrestore variants of spin_(un)lock() didn't make it very clear whether or not that would actually be safe. So I went ahead and

[RFC v7 04/11] drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()

2020-06-24 Thread Lyude Paul
We'll be rolling back more things in this function, and the way it's structured is a bit confusing. So, let's clean this up a bit and just unroll in the event of failure. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head.c | 33 + 1 file changed, 23

[RFC v7 01/11] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc

2020-06-24 Thread Lyude Paul
Since we'll be allocating resources for kthread_create_worker() in the next commit (which could fail and require us to clean up the mess), let's simplify the cleanup process a bit by registering a drm_vblank_init_release() action for each drm_vblank_crtc so they're still cleaned up if we fail to

[RFC v7 09/11] drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h

2020-06-24 Thread Lyude Paul
In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul ---

[RFC v7 07/11] drm/nouveau/kms/nv50-: s/harm/armh/g

2020-06-24 Thread Lyude Paul
We refer to the armed hardware assembly as armh elsewhere in nouveau, so fix the naming here to make it consistent. This patch contains no functional changes. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[RFC v7 03/11] drm/vblank: Add vblank works

2020-06-24 Thread Lyude Paul
Add some kind of vblank workers. The interface is similar to regular delayed works, and is mostly based off kthread_work. It allows for scheduling delayed works that execute once a particular vblank sequence has passed. It also allows for accurate flushing of scheduled vblank works - in that

[RFC v7 08/11] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom

2020-06-24 Thread Lyude Paul
While we're not quite ready yet to add support for flexible wndw mappings, we are going to need to at least keep track of the static wndw mappings we're currently using in each head's atomic state. We'll likely use this in the future to implement real flexible window mapping, but the primary

[RFC v7 00/11] drm/nouveau: Introduce CRC support for gf119+

2020-06-24 Thread Lyude Paul
Nvidia released some documentation on how CRC support works on their GPUs, hooray! So: this patch series implements said CRC support in nouveau, along with adding some special debugfs interfaces for some relevant igt-gpu-tools tests (already on the ML). First - we add some new functionality to

Re: [PATCH 27/27] drm: Add default modes for connectors in unknown state

2020-06-24 Thread Laurent Pinchart
Hi Daniel, On Wed, Jun 24, 2020 at 09:23:04AM +0200, Daniel Vetter wrote: > On Wed, Jun 24, 2020 at 04:12:09AM +0300, Laurent Pinchart wrote: > > On Sun, Jun 21, 2020 at 10:40:00AM +0200, Sam Ravnborg wrote: > > > On Tue, May 26, 2020 at 04:15:05AM +0300, Laurent Pinchart wrote: > > > > The DRM

[PATCH v2 3/3] Revert "drm/amd/display: Expose connector VRR range via debugfs"

2020-06-24 Thread Manasi Navare
From: Bhanuprakash Modem v2: * Rebase (Manasi) As both VRR min and max are already part of drm_display_info, drm can expose this VRR range for each connector. Hence this logic should move to core DRM. This reverts commit 727962f030c23422a01e8b22d0f463815fb15ec4. Signed-off-by: Bhanuprakash

[pull] amdgpu, amdkfd, radeon drm-fixes-5.8

2020-06-24 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.8. The following changes since commit 48778464bb7d346b47157d21ffde2af6b2d39110: Linux 5.8-rc2 (2020-06-21 15:45:29 -0700) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux tags/amd-drm-fixes-5.8-2020-06-24 for you to fetch

Re: [RESEND PATCH v5 5/5] drm/bridge: lvds-codec: simplify error handling code

2020-06-24 Thread Laurent Pinchart
Hi Andrzej, On Wed, Jun 24, 2020 at 04:03:30PM +0200, Andrzej Hajda wrote: > On 24.06.2020 15:33, Laurent Pinchart wrote: > > On Wed, Jun 24, 2020 at 01:41:27PM +0200, Andrzej Hajda wrote: > >> Using probe_err code has following advantages: > >> - shorter code, > >> - recorded defer probe reason

[radeon-alex:drm-next 333/496] arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean

2020-06-24 Thread kernel test robot
Hi Evan, FYI, the error/warning still remains. tree: git://people.freedesktop.org/~agd5f/linux.git drm-next head: d86eab497ead0df7157704c0ed540652d6ba7ddc commit: 5872ef0b03247fe659226973998ff28e835afbe4 [333/496] drm/amd/powerplay: forbid to use pr_err/warn/info/debug config:

[Bug 206475] amdgpu under load drop signal to monitor until hard reset

2020-06-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206475 Alex Deucher (alexdeuc...@gmail.com) changed: What|Removed |Added CC|

[Bug 206475] amdgpu under load drop signal to monitor until hard reset

2020-06-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206475 --- Comment #15 from Andrew Ammerlaan (andrewammerl...@riseup.net) --- So today it was *really* hot, and I had this issue occur a couple of times. (The solution with the extra fans was nice and all, but not enough to prevent it entirely)

Re: [PATCH] drm/msm/dpu: add support for dither block in display

2020-06-24 Thread Rob Clark
On Wed, Jun 24, 2020 at 4:57 AM Kalyan Thota wrote: > > This change enables dither block for primary interface > in display. > > Enabled for 6bpc in the current version. > > Signed-off-by: Kalyan Thota > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 45 + >

Re: [PATCH 27/27] drm: Add default modes for connectors in unknown state

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 3:31 PM Daniel Vetter wrote: > > On Wed, Jun 24, 2020 at 5:24 PM Alex Deucher wrote: > > > > On Wed, Jun 24, 2020 at 3:23 AM Daniel Vetter wrote: > > > > > > On Wed, Jun 24, 2020 at 04:12:09AM +0300, Laurent Pinchart wrote: > > > > Hi Sam, > > > > > > > > On Sun, Jun 21,

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 17:16, Robin Murphy wrote: > On 2020-06-24 16:04, Mark Brown wrote: >> On Wed, Jun 24, 2020 at 03:25:33PM +0100, Robin Murphy wrote: >> >>> And yeah, anyone who pipes up suggesting that places where an >>> ERR_PTR value >>> could be passed to probe_err() could simply refactor

Re: [PATCH] dma-buf: minor doc touch-ups

2020-06-24 Thread Daniel Vetter
On Fri, Jun 12, 2020 at 09:05:35AM +0200, Daniel Vetter wrote: > Just some tiny edits: > - fix link to struct dma_fence > - give slightly more meaningful title - the polling here is about > implicit fences, explicit fences (in sync_file or drm_syncobj) also > have their own polling > > v2: I

Re: [PATCH 27/27] drm: Add default modes for connectors in unknown state

2020-06-24 Thread Daniel Vetter
On Wed, Jun 24, 2020 at 5:24 PM Alex Deucher wrote: > > On Wed, Jun 24, 2020 at 3:23 AM Daniel Vetter wrote: > > > > On Wed, Jun 24, 2020 at 04:12:09AM +0300, Laurent Pinchart wrote: > > > Hi Sam, > > > > > > On Sun, Jun 21, 2020 at 10:40:00AM +0200, Sam Ravnborg wrote: > > > > On Tue, May 26,

[Bug 204241] amdgpu fails to resume from suspend

2020-06-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204241 poinck (an...@poinck.de) changed: What|Removed |Added CC||an...@poinck.de --- Comment

Re: [bug report] drm/vc4: dsi: Fix bridge chain handling

2020-06-24 Thread Dan Carpenter
On Wed, Jun 24, 2020 at 08:30:25PM +0200, Boris Brezillon wrote: > Hello Dan, > > On Wed, 24 Jun 2020 20:58:06 +0300 > Dan Carpenter wrote: > > > Hello Boris Brezillon, > > > > The patch 033bfe7538a1: "drm/vc4: dsi: Fix bridge chain handling" > > from Dec 27, 2019, leads to the following

Re: [bug report] drm/vc4: dsi: Fix bridge chain handling

2020-06-24 Thread Boris Brezillon
Hello Dan, On Wed, 24 Jun 2020 20:58:06 +0300 Dan Carpenter wrote: > Hello Boris Brezillon, > > The patch 033bfe7538a1: "drm/vc4: dsi: Fix bridge chain handling" > from Dec 27, 2019, leads to the following static checker warning: > > drivers/gpu/drm/vc4/vc4_dsi.c:758

[bug report] drm/vc4: dsi: Fix bridge chain handling

2020-06-24 Thread Dan Carpenter
Hello Boris Brezillon, The patch 033bfe7538a1: "drm/vc4: dsi: Fix bridge chain handling" from Dec 27, 2019, leads to the following static checker warning: drivers/gpu/drm/vc4/vc4_dsi.c:758 vc4_dsi_encoder_disable() warn: iterator used outside loop: 'iter'

Re: [PATCH v3 2/6] drm: msm: a6xx: send opp instead of a frequency

2020-06-24 Thread Matthias Kaehlcke
Hi, On Thu, Jun 18, 2020 at 10:52:09AM -0700, Rob Clark wrote: > On Fri, Jun 5, 2020 at 9:26 PM Sharat Masetty wrote: > > > > This patch changes the plumbing to send the devfreq recommended opp rather > > than the frequency. Also consolidate and rearrange the code in a6xx to set > > the GPU

[GIT PULL] drm/tegra: Fixes for v5.8-rc3

2020-06-24 Thread Thierry Reding
Hi Dave, The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407: Linux 5.8-rc1 (2020-06-14 12:45:04 -0700) are available in the Git repository at: git://anongit.freedesktop.org/tegra/linux tags/drm/tegra/for-5.8-rc3 for you to fetch changes up to

Re: [PATCH 0/8] Fix a bunch of W=1 warnings in Backlight

2020-06-24 Thread Sam Ravnborg
Hi Lee. On Wed, Jun 24, 2020 at 04:43:21PM +0100, Lee Jones wrote: > On Wed, 24 Jun 2020, Sam Ravnborg wrote: > > > Hi Lee. > > > > On Wed, Jun 24, 2020 at 03:57:13PM +0100, Lee Jones wrote: > > > Attempting to clean-up W=1 kernel builds, which are currently > > > overwhelmingly riddled with

Re: [PATCH 0/8] Fix a bunch of W=1 warnings in Backlight

2020-06-24 Thread Lee Jones
On Wed, 24 Jun 2020, Sam Ravnborg wrote: > Hi Lee. > > On Wed, Jun 24, 2020 at 03:57:13PM +0100, Lee Jones wrote: > > Attempting to clean-up W=1 kernel builds, which are currently > > overwhelmingly riddled with niggly little warnings. > > > > Lee Jones (8): > > backlight: lms501kf03: Remove

Re: [PATCH v2] drm/bridge: dw-mipi-dsi.c: Add VPG runtime config through debugfs

2020-06-24 Thread Yannick FERTRE
Hello Angelo, thanks for the patch. Tested-by: Yannick Fertre Tested OK on STM32MP1-DISCO, DSI v1.31 Best regards On 4/6/20 3:49 PM, Angelo Ribeiro wrote: > Add support for the video pattern generator (VPG) BER pattern mode and > configuration in runtime. > > This enables using the debugfs

Re: [PATCH 0/8] Fix a bunch of W=1 warnings in Backlight

2020-06-24 Thread Sam Ravnborg
Hi Lee. On Wed, Jun 24, 2020 at 03:57:13PM +0100, Lee Jones wrote: > Attempting to clean-up W=1 kernel builds, which are currently > overwhelmingly riddled with niggly little warnings. > > Lee Jones (8): > backlight: lms501kf03: Remove unused const variables > backlight: lcd: Add missing

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 04:00:34PM +0100, Robin Murphy wrote: > Be thankful... And count me in as one of those miserable users; here's one > of mine being bad enough without even printing any specific messages about > deferring ;) > [robin@weasel-cheese ~]$ dmesg | grep dwmmc > [3.046297]

Re: [PATCH 27/27] drm: Add default modes for connectors in unknown state

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 3:23 AM Daniel Vetter wrote: > > On Wed, Jun 24, 2020 at 04:12:09AM +0300, Laurent Pinchart wrote: > > Hi Sam, > > > > On Sun, Jun 21, 2020 at 10:40:00AM +0200, Sam Ravnborg wrote: > > > On Tue, May 26, 2020 at 04:15:05AM +0300, Laurent Pinchart wrote: > > > > The DRM CRTC

Re: [RESEND][PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 10, 2020 at 12:12 PM Lukasz Luba wrote: > > Add support for other devices than CPUs. The registration function > does not require a valid cpumask pointer and is ready to handle new > devices. Some of the internal structures has been reorganized in order to > keep consistent view (like

Re: [PATCH] drm/radeon: fix array out-of-bounds read and write issues

2020-06-24 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jun 24, 2020 at 8:07 AM Colin King wrote: > > From: Colin Ian King > > There is an off-by-one bounds check on the index into arrays > table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that > can lead to reads and writes outside of arrays. Fix the

Re: [PATCH][next] drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 10:54 AM Colin King wrote: > > From: Colin Ian King > > In the cases where adev->jpeg.num_jpeg_inst is zero or the condition > adev->jpeg.harvest_config & (1 << i) is always non-zero the variable > ret is never set to an error condition and the function returns > an

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Robin Murphy
On 2020-06-24 16:04, Mark Brown wrote: On Wed, Jun 24, 2020 at 03:25:33PM +0100, Robin Murphy wrote: And yeah, anyone who pipes up suggesting that places where an ERR_PTR value could be passed to probe_err() could simply refactor IS_ERR() checks with more uses of the god-awful

Re: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jun 24, 2020 at 10:32 AM Nirmoy wrote: > > Acked-by: Nirmoy Das > > > Thanks, > > Nirmoy > > On 6/24/20 4:14 PM, Colin King wrote: > > From: Colin Ian King > > > > Currently the goto statement is skipping over a lot of setup code > > because it is outside of an

Re: [PATCH] drm/bridge: dw-mipi-dsi.c: remove unused header file

2020-06-24 Thread Yannick FERTRE
Hello Angelo, thank for patch. Reviewed-by: Yannick Fertre On 4/3/20 3:30 PM, Angelo Ribeiro wrote: > dw-mipi-dsi does not use any definition from drm_probe_helper. > > Coverity output: > Event unnecessary_header: > Including .../include/drm/drm_probe_helper.h does not provide any > needed

[PATCH 8/8] backlight: qcom-wled: Remove unused configs for LED3 and LED4

2020-06-24 Thread Lee Jones
Fixes W=1 warnings: drivers/video/backlight/qcom-wled.c:1294:34: warning: ‘wled4_string_cfg’ defined but not used [-Wunused-const-variable=] 1294 | static const struct wled_var_cfg wled4_string_cfg = { | ^~~~ drivers/video/backlight/qcom-wled.c:1290:34: warning:

[PATCH 7/8] backlight: lm3630a_bl: Remove invalid checks for unsigned int < 0

2020-06-24 Thread Lee Jones
unsigned ints 'sources' and 'bank' cannot be less than LM3630A_SINK_0 (0) and LM3630A_BANK_0 (0) respecitively, so change the logic to only check for thier two possible valid values. Fixes W=1 warnings: drivers/video/backlight/lm3630a_bl.c: In function ‘lm3630a_parse_led_sources’:

[PATCH 3/8] backlight: ili922x: Add missing kerneldoc descriptions for CHECK_FREQ_REG() args

2020-06-24 Thread Lee Jones
Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/ili922x.c:116: warning: Function parameter or member 's' not described in 'CHECK_FREQ_REG' drivers/video/backlight/ili922x.c:116: warning: Function parameter or member 'x' not

[PATCH 1/8] backlight: lms501kf03: Remove unused const variables

2020-06-24 Thread Lee Jones
W=1 kernel build reports: drivers/video/backlight/lms501kf03.c:96:28: warning: ‘seq_sleep_in’ defined but not used [-Wunused-const-variable=] 96 | static const unsigned char seq_sleep_in[] = { | ^~~~ drivers/video/backlight/lms501kf03.c:92:28: warning: ‘seq_up_dn’ defined but not

[PATCH 0/8] Fix a bunch of W=1 warnings in Backlight

2020-06-24 Thread Lee Jones
Attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. Lee Jones (8): backlight: lms501kf03: Remove unused const variables backlight: lcd: Add missing kerneldoc entry for 'struct device parent' backlight: ili922x: Add missing

[PATCH 4/8] backlight: ili922x: Remove invalid use of kerneldoc syntax

2020-06-24 Thread Lee Jones
Kerneldoc is for documenting function arguments and return values. Prevents warnings like: drivers/video/backlight/ili922x.c:127: warning: cannot understand function prototype: 'int ili922x_id = 1; ' drivers/video/backlight/ili922x.c:136: warning: cannot understand function prototype:

[PATCH 6/8] backlight: backlight: Supply description for function args in existing Kerneldocs

2020-06-24 Thread Lee Jones
Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/backlight.c:329: warning: Function parameter or member 'reason' not described in 'backlight_force_update' drivers/video/backlight/backlight.c:354: warning: Function parameter or

[PATCH 2/8] backlight: lcd: Add missing kerneldoc entry for 'struct device parent'

2020-06-24 Thread Lee Jones
This has been missing since the conversion to 'struct device' in 2007. Cc: Cc: Bartlomiej Zolnierkiewicz Cc: Jamey Hicks Cc: Andrew Zabolotny Signed-off-by: Lee Jones --- drivers/video/backlight/lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lcd.c

[PATCH 5/8] backlight: ili922x: Add missing kerneldoc description for ili922x_reg_dump()'s arg

2020-06-24 Thread Lee Jones
Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/ili922x.c:298: warning: Function parameter or member 'spi' not described in 'ili922x_reg_dump' Cc: Cc: Bartlomiej Zolnierkiewicz Cc: Software Engineering Signed-off-by: Lee

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 03:25:33PM +0100, Robin Murphy wrote: > And yeah, anyone who pipes up suggesting that places where an ERR_PTR value > could be passed to probe_err() could simply refactor IS_ERR() checks with > more uses of the god-awful PTR_ERR_OR_ZERO() obfuscator gets a long stare of >

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Robin Murphy
On 2020-06-24 15:02, Mark Brown wrote: > On Wed, Jun 24, 2020 at 04:45:28PM +0300, Andy Shevchenko wrote: >> On Wed, Jun 24, 2020 at 4:27 PM Mark Brown wrote: > >>> As I said down the thread that's not a great pattern since it means that >>> probe deferral errors never get displayed and users

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 24, 2020 at 4:44 PM Andrzej Hajda wrote: > > > On 24.06.2020 14:14, Rafael J. Wysocki wrote: > > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: > >> Many resource acquisition functions return error value encapsulated in > >> pointer instead of integer value. To simplify coding

[PATCH][next] drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

2020-06-24 Thread Colin King
From: Colin Ian King In the cases where adev->jpeg.num_jpeg_inst is zero or the condition adev->jpeg.harvest_config & (1 << i) is always non-zero the variable ret is never set to an error condition and the function returns an uninitialized value in ret. Since the only exit condition at the end

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:30, Greg Kroah-Hartman wrote: > On Wed, Jun 24, 2020 at 01:41:25PM +0200, Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which will accept both types of

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:14, Rafael J. Wysocki wrote: > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which will accept both types of error. >>

Re: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Nirmoy
Acked-by: Nirmoy Das Thanks, Nirmoy On 6/24/20 4:14 PM, Colin King wrote: From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces.

Re: [PATCH] drm/fb-helper: Fix vt restore

2020-06-24 Thread Alex Deucher
On Wed, Jun 24, 2020 at 5:29 AM Daniel Vetter wrote: > > In the past we had a pile of hacks to orchestrate access between fbdev > emulation and native kms clients. We've tried to streamline this, by > always preferring the kms side above fbdev calls when a drm master > exists, because drm master

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Robin Murphy
On 2020-06-24 13:55, Andy Shevchenko wrote: On Wed, Jun 24, 2020 at 3:37 PM Robin Murphy wrote: On 2020-06-24 12:41, Andrzej Hajda wrote: Many resource acquisition functions return error value encapsulated in pointer instead of integer value. To simplify coding we can use macro which will

[PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Colin King
From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces. Addresses-Coverity: ("Structurally dead code") Fixes: fd151ca5396d ("drm amdgpu: SI UVD v3_1")

Re: [RESEND PATCH v5 4/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 03:43:10PM +0200, Andrzej Hajda wrote: > > On 24.06.2020 15:25, Mark Brown wrote: > > If we silently ignore all deferred probe errors we make it hard for > > anyone who is experiencing issues with deferred probe to figure out what > > they're missing. We should at least

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 15:23, Laurent Pinchart wrote: > On Wed, Jun 24, 2020 at 02:31:40PM +0200, Greg Kroah-Hartman wrote: >> On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: >>> During probe every time driver gets resource it should usually check for >>> error >>> printk some message if

Re: [RESEND PATCH v5 5/5] drm/bridge: lvds-codec: simplify error handling code

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 15:33, Laurent Pinchart wrote: > Hi Andrzej, > > On Wed, Jun 24, 2020 at 01:41:27PM +0200, Andrzej Hajda wrote: >> Using probe_err code has following advantages: >> - shorter code, >> - recorded defer probe reason for debugging, >> - uniform error code logging. >> >> Signed-off-by:

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 04:45:28PM +0300, Andy Shevchenko wrote: > On Wed, Jun 24, 2020 at 4:27 PM Mark Brown wrote: > > As I said down the thread that's not a great pattern since it means that > > probe deferral errors never get displayed and users have a hard time > > figuring out why their

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Andy Shevchenko
On Wed, Jun 24, 2020 at 4:27 PM Mark Brown wrote: > > On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: > > During probe every time driver gets resource it should usually check for > > error > > printk some message if it is not -EPROBE_DEFER and return the error. This > > As I said

Re: [RESEND PATCH v5 4/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 15:25, Mark Brown wrote: On Wed, Jun 24, 2020 at 01:41:26PM +0200, Andrzej Hajda wrote: In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using probe_err helper solves the issue. Moreover it records defer probe

[PATCH 2/2] drm/ttm: make TT creation purely optional

2020-06-24 Thread Christian König
We only need the page array when the BO is about to be accessed. So not only populate, but also create it on demand. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 26 -- drivers/gpu/drm/ttm/ttm_bo_util.c | 9 +++--

[PATCH 1/2] drm/ttm: cleanup ttm_mem_type_manager_func.get_node interface

2020-06-24 Thread Christian König
Instead of signaling failure by setting the node pointer to NULL do so by returning -ENOSPC. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_ttm.c | 8

Re: [RESEND PATCH v5 5/5] drm/bridge: lvds-codec: simplify error handling code

2020-06-24 Thread Laurent Pinchart
Hi Andrzej, On Wed, Jun 24, 2020 at 01:41:27PM +0200, Andrzej Hajda wrote: > Using probe_err code has following advantages: > - shorter code, > - recorded defer probe reason for debugging, > - uniform error code logging. > > Signed-off-by: Andrzej Hajda > --- >

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Laurent Pinchart
On Wed, Jun 24, 2020 at 01:37:52PM +0100, Robin Murphy wrote: > On 2020-06-24 12:41, Andrzej Hajda wrote: > > Many resource acquisition functions return error value encapsulated in > > pointer instead of integer value. To simplify coding we can use macro > > which will accept both types of error.

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:11, Rafael J. Wysocki wrote: > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe, the patch >> improves it. >> The natural

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: > During probe every time driver gets resource it should usually check for error > printk some message if it is not -EPROBE_DEFER and return the error. This As I said down the thread that's not a great pattern since it means that

Re: [PATCH v6] drm/fourcc: document modifier uniqueness requirements

2020-06-24 Thread Brian Starkey
Looks good now, thanks! On Wed, Jun 24, 2020 at 01:01:31PM +, Simon Ser wrote: > There have suggestions to bake pitch alignment, address alignement, > contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) > constraints into modifiers. Last time this was brought up it seemed > like

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:34, Greg Kroah-Hartman wrote: > On Wed, Jun 24, 2020 at 01:41:24PM +0200, Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe, the patch >> improves it. >>

Re: [RESEND PATCH v5 4/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-24 Thread Mark Brown
On Wed, Jun 24, 2020 at 01:41:26PM +0200, Andrzej Hajda wrote: > In case of error during resource acquisition driver should print error > message only in case it is not deferred probe, using probe_err helper > solves the issue. Moreover it records defer probe reason for debugging. If we silently

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Laurent Pinchart
On Wed, Jun 24, 2020 at 02:31:40PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: > > During probe every time driver gets resource it should usually check for > > error > > printk some message if it is not -EPROBE_DEFER and return the error. This

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:53, Andy Shevchenko wrote: > On Wed, Jun 24, 2020 at 2:41 PM Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which will accept both types of error. >> With

Re: [PATCH v3 37/43] drm/tilcdc: Use GEM CMA object functions

2020-06-24 Thread Jyri Sarha
On 05/06/2020 10:32, Thomas Zimmermann wrote: > Create GEM objects with drm_gem_cma_create_object_default_funcs(), which > allocates the object and sets CMA's default object functions. Corresponding > callbacks in struct drm_driver are cleared. No functional changes are made. > > Driver and

Re: [PATCH v3 38/43] drm/tilcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS

2020-06-24 Thread Jyri Sarha
On 05/06/2020 10:32, Thomas Zimmermann wrote: > DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver > to their defaults. No functional changes are made. > > Signed-off-by: Thomas Zimmermann > Acked-by: Emil Velikov Reviewed-by: Jyri Sarha Tested-by: Jyri Sarha > --- >

[PATCH v6] drm/fourcc: document modifier uniqueness requirements

2020-06-24 Thread Simon Ser
There have suggestions to bake pitch alignment, address alignement, contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) constraints into modifiers. Last time this was brought up it seemed like the consensus was to not allow this. Document this in drm_fourcc.h. There are several

Re: [PATCH v5] drm/fourcc: document modifier uniqueness requirements

2020-06-24 Thread Simon Ser
> > The new paragraph below looks good, but this sentence from the end of > > the paragraph above still needs to be removed: > > An example is AFBC, where both ARGB and ABGR have the exact same compressed > > layout. > > I think that entire paragraph was meant to be deleted, the replacement > is

Re: [PATCH v5] drm/fourcc: document modifier uniqueness requirements

2020-06-24 Thread Daniel Vetter
On Wed, Jun 24, 2020 at 1:08 PM Brian Starkey wrote: > > Hi, > > On Tue, Jun 23, 2020 at 03:25:08PM +, Simon Ser wrote: > > There have suggestions to bake pitch alignment, address alignement, > > contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) > > constraints into modifiers.

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andy Shevchenko
On Wed, Jun 24, 2020 at 3:37 PM Robin Murphy wrote: > On 2020-06-24 12:41, Andrzej Hajda wrote: > > Many resource acquisition functions return error value encapsulated in > > pointer instead of integer value. To simplify coding we can use macro > > which will accept both types of error. > > With

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andy Shevchenko
On Wed, Jun 24, 2020 at 2:41 PM Andrzej Hajda wrote: > > Many resource acquisition functions return error value encapsulated in > pointer instead of integer value. To simplify coding we can use macro > which will accept both types of error. > With this patch user can use: > probe_err(dev,

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Robin Murphy
On 2020-06-24 12:41, Andrzej Hajda wrote: Many resource acquisition functions return error value encapsulated in pointer instead of integer value. To simplify coding we can use macro which will accept both types of error. With this patch user can use: probe_err(dev, ptr, ...) instead of:

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Greg Kroah-Hartman
On Wed, Jun 24, 2020 at 01:41:24PM +0200, Andrzej Hajda wrote: > /sys/kernel/debug/devices_deferred property contains list of deferred devices. > This list does not contain reason why the driver deferred probe, the patch > improves it. > The natural place to set the reason is probe_err function

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Greg Kroah-Hartman
On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: > During probe every time driver gets resource it should usually check for error > printk some message if it is not -EPROBE_DEFER and return the error. This > pattern is simple but requires adding few lines after any resource

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Greg Kroah-Hartman
On Wed, Jun 24, 2020 at 01:41:25PM +0200, Andrzej Hajda wrote: > Many resource acquisition functions return error value encapsulated in > pointer instead of integer value. To simplify coding we can use macro > which will accept both types of error. > With this patch user can use: >

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: > > Many resource acquisition functions return error value encapsulated in > pointer instead of integer value. To simplify coding we can use macro > which will accept both types of error. > With this patch user can use: > probe_err(dev,

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: > > /sys/kernel/debug/devices_deferred property contains list of deferred devices. > This list does not contain reason why the driver deferred probe, the patch > improves it. > The natural place to set the reason is probe_err function

[PATCH] drm/radeon: fix array out-of-bounds read and write issues

2020-06-24 Thread Colin King
From: Colin Ian King There is an off-by-one bounds check on the index into arrays table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that can lead to reads and writes outside of arrays. Fix the bound checking off-by-one error. Addresses-Coverity: ("Out-of-bounds read/write")

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: > > During probe every time driver gets resource it should usually check for error > printk some message if it is not -EPROBE_DEFER and return the error. This > pattern is simple but requires adding few lines after any resource acquisition >

[RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Andrzej Hajda
During probe every time driver gets resource it should usually check for error printk some message if it is not -EPROBE_DEFER and return the error. This pattern is simple but requires adding few lines after any resource acquisition code, as a result it is often omited or implemented only

[RESEND PATCH v5 4/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-24 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using probe_err helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/sil-sii8620.c | 18

[RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
Many resource acquisition functions return error value encapsulated in pointer instead of integer value. To simplify coding we can use macro which will accept both types of error. With this patch user can use: probe_err(dev, ptr, ...) instead of: probe_err(dev, PTR_ERR(ptr), ...)

  1   2   >