Re: [PATCH] drm/hisilicon: Deleted the drm_device declaration

2020-09-25 Thread Thomas Zimmermann
Hi, just a few nits. Am 25.09.20 um 08:49 schrieb Tian Tao: > drm_framebuffer.h contains drm/drm_device.h and struct drm_device is contains -> includes > already declared in this file, so there is no need to declare struct declared -> defined > drm_device in hibm_drm_drv.h. > > Signed-off-by

[PATCH 2/3] Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts

2020-09-25 Thread Peilin Ye
syzbot has reported an issue in the framebuffer layer, where a malicious user may overflow our built-in font data buffers. In order to perform a reliable range check, subsystems need to know `FONTDATAMAX` for each built-in font. Unfortunately, our font descriptor, `struct console_font` does not co

[PATCH 2/2] dt-bindings: display: sii902x: Add supply bindings

2020-09-25 Thread Alexandru Gagniuc
The sii902x chip family requires IO and core voltages to reach the correct voltage before chip initialization. Add binding for describing the two supplies. Signed-off-by: Alexandru Gagniuc --- Documentation/devicetree/bindings/display/bridge/sii902x.txt | 4 1 file changed, 4 insertions(+)

Re: [Intel-gfx] [PATCH] i915: Introduce quirk for shifting eDP brightness.

2020-09-25 Thread Kevin Chowski
cc back a few others who were unintentionally dropped from the thread earlier. Someone (at Google) helped me dig into this a little more and they found a document titled "eDP Backlight Brightness bit alignment" sent out for review in January 2017. I registered for a new account (google is a member

[PATCH 6/6] drm/vc4: hdmi: Enable 10/12 bpc output

2020-09-25 Thread Maxime Ripard
The BCM2711 supports higher bpc count than just 8, so let's support it in our driver. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 68 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 +- drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 9 - 3 files cha

Re: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Peilin Ye
Hi! On Thu, Sep 24, 2020 at 02:42:18PM +, David Laight wrote: > > On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote: > > > Hi all, > > > > > > syzbot has reported [1] a global out-of-bounds read issue in > > > fbcon_get_font(). A malicious user may resize `vc_font.height` to a large >

Re: [PATCH 1/2] drm/bridge: sii902x: Enable I/O and core VCC supplies if present

2020-09-25 Thread Alex G.
On 9/24/20 3:22 PM, Fabio Estevam wrote: Hi Fabio, On Thu, Sep 24, 2020 at 5:16 PM Alexandru Gagniuc wrote: + ret = regulator_enable(sii902x->cvcc12); + if (ret < 0) { + dev_err(dev, "Failed to enable cvcc12 supply: %d\n", ret); + regulator_disable(sii9

[PATCH -next] video: Remove set but not used variable

2020-09-25 Thread Li Heng
Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/sis/300vtbl.h:1064:28: warning: ‘SiS300_CHTVVCLKSONTSC’ defined but not used [-Wunused-const-variable=] Reported-by: Hulk Robot Signed-off-by: Li Heng --- drivers/video/fbdev/sis/300vtbl.h | 2 -- 1 file changed, 2 deletions(-)

[PATCH 5/6] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-09-25 Thread Maxime Ripard
The pixel rate is for now quite simple to compute, but with more features (30 and 36 bits output, YUV output, etc.) will depend on a bunch of connectors properties. Let's store the rate we have to run the pixel clock at in our custom connector state, and compute it in atomic_check. Signed-off-by:

[PATCH 0/6] drm/vc4: hdmi: Support the 10/12 bit output

2020-09-25 Thread Maxime Ripard
Hi, Here's some patches to enable the HDR output in the RPi4 HDMI controller. This needed a quite intrusive rework in the first patch to allow a CRTC to have access to the whole DRM state at atomic_enable / atomic_disable time. Let me know what you think, Maxime Maxime Ripard (6): drm/atomic:

[PATCH] drm/msm: Add missing struct identifier

2020-09-25 Thread Tian Tao
fix warnings reported by make W=1 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:195: warning: cannot understand function prototype: 'const struct dpu_intr_reg dpu_intr_set[] = ' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:252: warning: cannot understand function prototype: 'const struct d

[PATCH 1/3] fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h

2020-09-25 Thread Peilin Ye
drivers/video/console/newport_con.c is borrowing FONT_EXTRA_WORDS macros from drivers/video/fbdev/core/fbcon.h. To keep things simple, move all definitions into . Since newport_con now uses four extra words, initialize the fourth word in newport_set_font() properly. Cc: sta...@vger.kernel.org Sig

RE: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread David Laight
> On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote: > > Hi all, > > > > syzbot has reported [1] a global out-of-bounds read issue in > > fbcon_get_font(). A malicious user may resize `vc_font.height` to a large > > value in vt_ioctl(), causing fbcon_get_font() to overflow our built-in > >

[PATCH] drm/msm/dp: return correct connection status after suspend/resume

2020-09-25 Thread Kuogee Hsieh
return connection status base on hpd realtime state status Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_catalog.c | 13 +++ drivers/gpu/drm/msm/dp/dp_catalog.h | 1 + drivers/gpu/drm/msm/dp/dp_display.c | 58 - drivers/gpu/drm/msm/dp/dp_reg.h |

[PATCH] drm/vc4: hdmi: Fix variable ret not used

2020-09-25 Thread Tian Tao
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_set_audio_infoframe’: drivers/gpu/drm/vc4/vc4_hdmi.c:334:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-25 Thread Thomas Gleixner
On Thu, Sep 24 2020 at 08:32, Steven Rostedt wrote: > On Thu, 24 Sep 2020 08:57:52 +0200 > Thomas Gleixner wrote: > >> > Now as for migration disabled nesting, at least now we would have >> > groupings of this, and perhaps the theorists can handle that. I mean, >> > how is this much different that

Re: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Peilin Ye
On Thu, Sep 24, 2020 at 06:45:16PM +0300, Dan Carpenter wrote: > Smatch has a tool to show where struct members are set. > > `~/smatch/smatch_data/db/smdb.py where console_font height` > > It's not perfect and this output comes from allmodconfig on yesterday's > linux-next. > > regards, > dan ca

Re: [PATCH 0/3] drm: commit_work scheduling

2020-09-25 Thread Qais Yousef
On 09/24/20 10:49, Daniel Vetter wrote: [...] > > > I also thought kernel threads can be distinguished from others, so > > > userspace shouldn't be able to sneak in and get elevated by accident. > > > > I guess maybe you could look at the parent? I still would like to > > think that we could co

[PATCH 1/2] drm/bridge: sii902x: Enable I/O and core VCC supplies if present

2020-09-25 Thread Alexandru Gagniuc
On the SII9022, the IOVCC and CVCC12 supplies must reach the correct voltage before the reset sequence is initiated. On most boards, this assumption is true at boot-up, so initialization succeeds. However, when we try to initialize the chip with incorrect supply voltages, it will not respond to I2

[PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Peilin Ye
Hi all, syzbot has reported [1] a global out-of-bounds read issue in fbcon_get_font(). A malicious user may resize `vc_font.height` to a large value in vt_ioctl(), causing fbcon_get_font() to overflow our built-in font data buffers, declared in lib/fonts/font_*.c: (e.g. lib/fonts/font_8x8.c) #def

[PATCH] drm/hisilicon: Deleted the drm_device declaration

2020-09-25 Thread Tian Tao
drm_framebuffer.h contains drm/drm_device.h and struct drm_device is already declared in this file, so there is no need to declare struct drm_device in hibm_drm_drv.h. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a

[PATCH 1/6] drm/atomic: Pass the full state to CRTC atomic enable/disable

2020-09-25 Thread Maxime Ripard
If the CRTC driver ever needs to access the full DRM state, it can't do so at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state will have cleared the pointer from the struct drm_crtc_state to the struct drm_atomic_state before calling those hooks. In order to allow that, let's

[PATCH 3/3] fbcon: Fix global-out-of-bounds read in fbcon_get_font()

2020-09-25 Thread Peilin Ye
fbcon_get_font() is reading out-of-bounds. A malicious user may resize `vc->vc_font.height` to a large value, causing fbcon_get_font() to read out of `fontdata`. fbcon_get_font() handles both built-in and user-provided fonts. Fortunately, recently we have added FONT_EXTRA_WORDS support for built-i

[PATCH 3/6] drm/vc4: Pass the atomic state to encoder hooks

2020-09-25 Thread Maxime Ripard
We'll need to access the connector state in our encoder setup, so let's just pass the whole DRM state to our private encoder hooks. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 18 ++ drivers/gpu/drm/vc4/vc4_drv.h | 10 +- drivers/gpu/drm/vc4/vc4_hdm

Re: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Peilin Ye
On Thu, Sep 24, 2020 at 04:09:37PM +0200, Greg Kroah-Hartman wrote: > On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote: > > Peilin Ye (3): > > fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h > > Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts > > fbcon: F

[PATCH 4/6] drm/vc4: hdmi: Create a custom connector state

2020-09-25 Thread Maxime Ripard
When run with a higher bpc than 8, the clock of the HDMI controller needs to be adjusted. Let's create a connector state that will be used at atomic_check and atomic_enable to compute and store the clock rate associated to the state. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.

[PATCH 2/6] drm/vc4: hvs: Align the HVS atomic hooks to the new API

2020-09-25 Thread Maxime Ripard
Since the CRTC setup in vc4 is split between the PixelValves/TXP and the HVS, only the PV/TXP atomic hooks were updated in the previous commits, but it makes sense to update the HVS ones too. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4 +--- drivers/gpu/drm/vc4/vc4_drv.h

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Leon Romanovsky
On Thu, Sep 24, 2020 at 09:21:20AM +0100, Tvrtko Ursulin wrote: > > On 22/09/2020 09:39, Leon Romanovsky wrote: > > From: Maor Gottlieb > > > > Extend __sg_alloc_table_from_pages to support dynamic allocation of > > SG table from pages. It should be used by drivers that can't supply > > all the pa

Re: [PATCH] drm/hisilicon: Deleted the drm_device declaration

2020-09-25 Thread Thomas Zimmermann
Hi Am 25.09.20 um 09:02 schrieb Thomas Zimmermann: > Hi, > > just a few nits. > > Am 25.09.20 um 08:49 schrieb Tian Tao: >> drm_framebuffer.h contains drm/drm_device.h and struct drm_device is > > contains -> includes > >> already declared in this file, so there is no need to declare struct >

[Bug 204241] amdgpu fails to resume from suspend

2020-09-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204241 waltib...@protonmail.com changed: What|Removed |Added CC||waltib...@protonmail.com --- C

[Bug 204241] amdgpu fails to resume from suspend

2020-09-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204241 --- Comment #66 from waltib...@protonmail.com --- Created attachment 292637 --> https://bugzilla.kernel.org/attachment.cgi?id=292637&action=edit dmesg 5.8.9-arch2-1 truncated dmesg logs of resume failures on 5.8.9-arch2-1 3 boot/suspend/resume/

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Christian König
Am 25.09.20 um 01:14 schrieb Dave Airlie: On Thu, 24 Sep 2020 at 22:42, Christian König wrote: Am 24.09.20 um 07:18 schrieb Dave Airlie: From: Dave Airlie All the accel moves do the same pattern here, provide a helper And exactly that pattern I want to get away from. Currently this is just

Re: [PATCH 1/5] drm: add legacy support for using degamma for gamma

2020-09-25 Thread Pekka Paalanen
On Wed, 23 Sep 2020 14:57:23 +0300 Tomi Valkeinen wrote: > We currently have drm_atomic_helper_legacy_gamma_set() helper which can > be used to handle legacy gamma-set ioctl. > drm_atomic_helper_legacy_gamma_set() sets GAMMA_LUT, and clears > CTM and DEGAMMA_LUT. This works fine on HW where we ha

Re: [PATCH 2/5] drm/omap: use degamma property for gamma table

2020-09-25 Thread Pekka Paalanen
On Wed, 23 Sep 2020 14:57:24 +0300 Tomi Valkeinen wrote: > omapdrm supports gamma via GAMMA_LUT property. However, the HW we have > is: > > gamma -> ctm -> out > > instead of what the model DRM framework uses: > > ctm -> gamma -> out > > As the following patches add CTM support for omapdrm, l

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 9:39 AM Christian König wrote: > > Am 25.09.20 um 01:14 schrieb Dave Airlie: > > On Thu, 24 Sep 2020 at 22:42, Christian König > > wrote: > >> Am 24.09.20 um 07:18 schrieb Dave Airlie: > >>> From: Dave Airlie > >>> > >>> All the accel moves do the same pattern here, prov

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 10:16 AM Daniel Vetter wrote: > > On Fri, Sep 25, 2020 at 9:39 AM Christian König > wrote: > > > > Am 25.09.20 um 01:14 schrieb Dave Airlie: > > > On Thu, 24 Sep 2020 at 22:42, Christian König > > > wrote: > > >> Am 24.09.20 um 07:18 schrieb Dave Airlie: > > >>> From: Da

Re: [PATCH 0/3] drm: commit_work scheduling

2020-09-25 Thread Daniel Vetter
On Thu, Sep 24, 2020 at 05:15:00PM +0100, Qais Yousef wrote: > On 09/24/20 10:49, Daniel Vetter wrote: > > [...] > > > > > I also thought kernel threads can be distinguished from others, so > > > > userspace shouldn't be able to sneak in and get elevated by accident. > > > > > > I guess maybe yo

Re: [PATCH] drm/atomic: document and enforce rules around "spurious" EBUSY

2020-09-25 Thread Pekka Paalanen
On Wed, 23 Sep 2020 17:18:52 +0200 Daniel Vetter wrote: > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > pull in arbitrary other resources, including CRTCs (e.g. when > reconfiguring global resources). > > But in nonblocking mode userspace has then no idea this happened

Re: [PATCH 2/2] drm/atomic: debug output for EBUSY

2020-09-25 Thread Pekka Paalanen
On Wed, 23 Sep 2020 12:57:37 +0200 Daniel Vetter wrote: > Hopefully we'll have the drm crash recorder RSN, but meanwhile > compositors would like to know a bit better why they get an EBUSY. > These debug messages will be especially useful with the flight recorder, but also without. :-) ... >

Re: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Daniel Vetter
On Thu, Sep 24, 2020 at 04:09:37PM +0200, Greg Kroah-Hartman wrote: > On Thu, Sep 24, 2020 at 09:38:22AM -0400, Peilin Ye wrote: > > Hi all, > > > > syzbot has reported [1] a global out-of-bounds read issue in > > fbcon_get_font(). A malicious user may resize `vc_font.height` to a large > > value

Re: [PATCH v3 00/22] Convert all remaining drivers to GEM object functions

2020-09-25 Thread Thomas Zimmermann
Hi Am 23.09.20 um 16:33 schrieb Christian König: > Feel free to add an Acked-by: Christian König > to all patches which I haven't explicitly reviewed. Done, thanks. > > I would say we should just push this to drm-misc-next now. It's merged now. Best regards Thomas > > Thanks for the nice c

Re: [PATCH] drm/atomic: document and enforce rules around "spurious" EBUSY

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 11:24:46AM +0300, Pekka Paalanen wrote: > On Wed, 23 Sep 2020 17:18:52 +0200 > Daniel Vetter wrote: > > > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > > pull in arbitrary other resources, including CRTCs (e.g. when > > reconfiguring global resou

[PATCH 2/2] drm/atomic: debug output for EBUSY

2020-09-25 Thread Daniel Vetter
Hopefully we'll have the drm crash recorder RSN, but meanwhile compositors would like to know a bit better why they get an EBUSY. v2: Move misplaced hunk to the right patch (Pekka) Cc: Sean Paul Cc: Daniel Stone Cc: Pekka Paalanen Cc: Simon Ser Cc: Ville Syrjälä Signed-off-by: Daniel Vetter

[PATCH 1/2] drm/atomic: document and enforce rules around "spurious" EBUSY

2020-09-25 Thread Daniel Vetter
When doing an atomic modeset with ALLOW_MODESET drivers are allowed to pull in arbitrary other resources, including CRTCs (e.g. when reconfiguring global resources). But in nonblocking mode userspace has then no idea this happened, which can lead to spurious EBUSY calls, both: - when that other CR

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-25 Thread David Hildenbrand
On 24.09.20 23:50, Dan Williams wrote: > On Thu, Sep 24, 2020 at 2:42 PM David Hildenbrand wrote: >> >> >> >>> Am 24.09.2020 um 23:26 schrieb Dan Williams : >>> >>> [..] > I'm not suggesting to busy the whole "virtio" range, just the portion > that's about to be passed to add_memory_drive

Re: [PATCH] drm/vc4: Deleted the drm_device declaration

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 04:51:38PM +0800, Tian Tao wrote: > drm_modeset_lock.h already declares struct drm_device, so there's no > need to declare it in vc4_drv.h > > Signed-off-by: Tian Tao Just an aside, when submitting patches please use scripts/get_maintainers.pl to generate the recipient li

Re: [PATCH 2/2] drm/atomic: debug output for EBUSY

2020-09-25 Thread Pekka Paalanen
On Fri, 25 Sep 2020 10:46:51 +0200 Daniel Vetter wrote: > Hopefully we'll have the drm crash recorder RSN, but meanwhile > compositors would like to know a bit better why they get an EBUSY. > > v2: Move misplaced hunk to the right patch (Pekka) Hi, both patches Acked-by: Pekka Paalanen Tha

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Christian König
Am 25.09.20 um 10:18 schrieb Daniel Vetter: On Fri, Sep 25, 2020 at 10:16 AM Daniel Vetter wrote: On Fri, Sep 25, 2020 at 9:39 AM Christian König wrote: Am 25.09.20 um 01:14 schrieb Dave Airlie: On Thu, 24 Sep 2020 at 22:42, Christian König wrote: Am 24.09.20 um 07:18 schrieb Dave Airlie:

Re: [PATCH 3/4] drm/etnaviv: add total hi bandwidth perfcounter

2020-09-25 Thread Lucas Stach
On Fr, 2020-08-14 at 11:05 +0200, Christian Gmeiner wrote: > These two perf counters represent the total read and write > GPU bandwidth in terms of 64bits. > > The used sequence was taken from Vivante kernel driver. > > Signed-off-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_pe

Re: [PATCH 0/4] drm/etnaviv: add total hi bandwidth perf counters

2020-09-25 Thread Lucas Stach
On Fr, 2020-08-14 at 11:05 +0200, Christian Gmeiner wrote: > This little patch set adds support for the total bandwidth used by HI. The > basic hi bandwidth read-out is quite simple but I needed to add some little > clean-ups to make it nice looking. > > Christian Gmeiner (4): > drm/etnaviv: ren

Re: [PATCH] drm/etnaviv: Drop local dma_parms

2020-09-25 Thread Lucas Stach
On Do, 2020-09-03 at 21:40 +0100, Robin Murphy wrote: > Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms > for platform devices"), struct platform_device already provides a > dma_parms structure, so we can save allocating another one. > > Signed-off-by: Robin Murphy Thanks

[PATCH] drm/stm: dsi: Use dev_ based logging

2020-09-25 Thread Yannick Fertre
Standardize on the dev_ based logging and drop the include of drm_print.h. Remove useless dsi_color_from_mipi function. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 87 ++- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/driver

Re: [PATCH 0/3] fbdev: stop using compat_alloc_user_space

2020-09-25 Thread Arnd Bergmann
On Thu, Sep 24, 2020 at 10:54 PM Sam Ravnborg wrote: > > Hi Daniel/Arnd. > > On Fri, Sep 18, 2020 at 02:48:08PM +0200, Daniel Vetter wrote: > > On Fri, Sep 18, 2020 at 12:08:10PM +0200, Arnd Bergmann wrote: > > > The fbdev code uses compat_alloc_user_space in a few of its > > > compat_ioctl handle

Re: [PATCH v2 1/3] dma-buf: Add struct dma-buf-map for storing struct dma_buf.vaddr_ptr

2020-09-25 Thread Thomas Zimmermann
Hi Am 23.09.20 um 16:27 schrieb Christian König: > Am 23.09.20 um 14:32 schrieb Thomas Zimmermann: >> The new type struct dma_buf_map represents a mapping of dma-buf memory >> into kernel space. It contains a flag, is_iomem, that signals users to >> access the mapped memory with I/O operations ins

Re: [PATCH] drm: bridge: cdns-mhdp8546: fix compile warning

2020-09-25 Thread Tomi Valkeinen
On 24/09/2020 14:48, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Wed, Sep 23, 2020 at 11:30:57AM +0300, Tomi Valkeinen wrote: >> On x64 we get: >> >> drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:751:10: warning: >> conversion from 'long unsigned int' to 'unsigne

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Tvrtko Ursulin
On 25/09/2020 08:13, Leon Romanovsky wrote: On Thu, Sep 24, 2020 at 09:21:20AM +0100, Tvrtko Ursulin wrote: On 22/09/2020 09:39, Leon Romanovsky wrote: From: Maor Gottlieb Extend __sg_alloc_table_from_pages to support dynamic allocation of SG table from pages. It should be used by drivers

Re: [PATCH v2 1/2] drm/vc4: crtc: Rework a bit the CRTC state code

2020-09-25 Thread Dave Stevenson
On Fri, 25 Sep 2020 at 12:38, Maxime Ripard wrote: > > Hi Dave, > > On Wed, Sep 23, 2020 at 03:59:04PM +0100, Dave Stevenson wrote: > > Hi Maxime > > > > On Wed, 23 Sep 2020 at 09:40, Maxime Ripard wrote: > > > > > > The current CRTC state reset hook in vc4 allocates a vc4_crtc_state > > > struct

[PATCH v3 1/4] dma-buf: Add struct dma-buf-map for storing struct dma_buf.vaddr_ptr

2020-09-25 Thread Thomas Zimmermann
The new type struct dma_buf_map represents a mapping of dma-buf memory into kernel space. It contains a flag, is_iomem, that signals users to access the mapped memory with I/O operations instead of regular loads and stores. It was assumed that DMA buffer memory can be accessed with regular load an

[PATCH v3 2/4] dma-buf: Use struct dma_buf_map in dma_buf_vmap() interfaces

2020-09-25 Thread Thomas Zimmermann
This patch updates dma_buf_vmap() and dma-buf's vmap callback to use struct dma_buf_map. The interfaces used to return a buffer address. This address now gets stored in an instance of the structure that is given as an additional argument. The functions return an errno code on errors. Users of the

[PATCH v3 0/4] dma-buf: Flag vmap'ed memory as system or I/O memory

2020-09-25 Thread Thomas Zimmermann
Dma-buf provides vmap() and vunmap() for retriving and releasing mappings of dma-buf memory in kernel address space. The functions operate with plain addresses and the assumption is that the memory can be accessed with load and store operations. This is not the case on some architectures (e.g., spa

[PATCH v3 3/4] dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces

2020-09-25 Thread Thomas Zimmermann
This patch updates dma_buf_vunmap() and dma-buf's vunmap callback to use struct dma_buf_map. The interfaces used to receive a buffer address. This address is now given in an instance of the structure. Users of the functions are updated accordingly. This is only an interface change. It is currently

[PATCH v3 4/4] dma-buf: Document struct dma_buf_map

2020-09-25 Thread Thomas Zimmermann
This patch adds struct dma_buf_map and its helpers to the documentation. A short tutorial is included. v3: * update documentation in a separate patch * expand docs (Daniel) * carry-over acks from patch 1 Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Revie

Re: [PATCH] drm: bridge: cdns-mhdp8546: fix compile warning

2020-09-25 Thread Laurent Pinchart
On Fri, Sep 25, 2020 at 10:36:44AM +0300, Tomi Valkeinen wrote: > On 24/09/2020 14:48, Laurent Pinchart wrote: > > Hi Tomi, > > > > Thank you for the patch. > > > > On Wed, Sep 23, 2020 at 11:30:57AM +0300, Tomi Valkeinen wrote: > >> On x64 we get: > >> > >> drivers/gpu/drm/bridge/cadence/cdns-mh

Re: [PATCH] drm/stm: dsi: Use dev_ based logging

2020-09-25 Thread Joe Perches
On Fri, 2020-09-25 at 12:22 +0200, Yannick Fertre wrote: > Standardize on the dev_ based logging and drop the include of drm_print.h. > Remove useless dsi_color_from_mipi function. [] > diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c > b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c [] > - DRM_DEBU

Re: [PATCH v2 2/2] drm/vc4: crtc: Keep the previously assigned HVS FIFO

2020-09-25 Thread Dave Stevenson
Hi Maxime Sorry for the delay. On Wed, 23 Sep 2020 at 09:40, Maxime Ripard wrote: > > The HVS FIFOs are currently assigned each time we have an atomic_check > for all the enabled CRTCs. > > However, if we are running multiple outputs in parallel and we happen to > disable the first (by index) CR

Re: [PATCH] drm: bridge: cdns-mhdp8546: fix compile warning

2020-09-25 Thread Laurent Pinchart
On Fri, Sep 25, 2020 at 03:05:52PM +0300, Tomi Valkeinen wrote: > On 25/09/2020 15:00, Laurent Pinchart wrote: > > On Fri, Sep 25, 2020 at 10:36:44AM +0300, Tomi Valkeinen wrote: > >> On 24/09/2020 14:48, Laurent Pinchart wrote: > >>> Hi Tomi, > >>> > >>> Thank you for the patch. > >>> > >>> On Wed

[RFC 0/7] Add support for DP-HDMI2.1 PCON

2020-09-25 Thread Ankit Nautiyal
This patch series attempts to add support for a DP-HDMI2.1 Protocol Convertor. The VESA spec for the HDMI2.1 PCON are proposed in Errata E5 to DisplayPort_v2.0: https://vesa.org/join-vesamemberships/member-downloads/?action=stamp&fileid=42299 The details are mentioned in DP to HDMI2.1 PCON Enum/Con

[RFC 4/7] drm/i915: Add support for starting FRL training for HDMI2.1 via PCON

2020-09-25 Thread Ankit Nautiyal
This patch adds functions to start FRL training for an HDMI2.1 sink, connected via a PCON as a DP branch device. This patch also adds a new structure for storing frl training related data, when FRL training is completed. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_types.

[RFC 1/7] drm/edid: Add additional HFVSDB fields for HDMI2.1

2020-09-25 Thread Ankit Nautiyal
From: Swati Sharma The HDMI2.1 extends HFVSBD (HDMI Forum Vendor Specific Data block) to have fields related to newly defined methods of FRL (Fixed Rate Link) levels, number of lanes supported, DSC Color bit depth, VRR min/max, FVA (Fast Vactive), ALLM etc. This patch adds the new HFVSDB fields

[RFC 5/7] drm/i915: Check for FRL training before DP Link training

2020-09-25 Thread Ankit Nautiyal
This patch calls functions to check FRL training requirements for an HDMI2.1 sink, when connected through PCON. The call is made before the DP link training. In case FRL is not required or failure during FRL training, the TMDS mode is selected for the pcon. Signed-off-by: Ankit Nautiyal --- driv

[RFC 6/7] drm/dp_helper: Add support for link status and link recovery

2020-09-25 Thread Ankit Nautiyal
From: Swati Sharma This patch adds support for link status and link recovery. There are specific DPCD’s defined for link status check and recovery in case of any issues. PCON will communicate the same using an IRQ_HPD to source. HDMI sink would have indicated the same to PCON using SCDC interrupt

[RFC 3/7] drm/dp_helper: Add FRL training support for a DP-HDMI2.1 PCON

2020-09-25 Thread Ankit Nautiyal
This patch adds support for configuring a PCON device, connected as a DP branched device to enable FRL Link training with a HDMI2.1 + sink. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_dp_helper.c | 305 include/drm/drm_dp_helper.h | 81 + 2

[RFC 7/7] drm/i915: Add support for enabling link status and recovery

2020-09-25 Thread Ankit Nautiyal
From: Swati Sharma In this patch enabled support for link status and recovery in i915 driver. HDMI link loss indication to upstream DP source is indicated via IRQ_HPD. This is followed by reading of HDMI link configuration status (HDMI_TX_LINK_ACTIVE_STATUS). If the PCON → HDMI 2.1 link status is

[RFC 2/7] drm/edid: Parse MAX_FRL field from HFVSDB block

2020-09-25 Thread Ankit Nautiyal
From: Swati Sharma This patch parses MAX_FRL field to get the MAX rate in Gbps that the HDMI 2.1 panel can support in FRL mode. Source need this field to determine the optimal rate between the source and sink during FRL training. Signed-off-by: Sharma, Swati2 Signed-off-by: Ankit Nautiyal ---

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Tvrtko Ursulin
On 25/09/2020 12:58, Jason Gunthorpe wrote: On Fri, Sep 25, 2020 at 12:41:29PM +0100, Tvrtko Ursulin wrote: On 25/09/2020 08:13, Leon Romanovsky wrote: On Thu, Sep 24, 2020 at 09:21:20AM +0100, Tvrtko Ursulin wrote: On 22/09/2020 09:39, Leon Romanovsky wrote: From: Maor Gottlieb Extend

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Tvrtko Ursulin
On 25/09/2020 13:18, Maor Gottlieb wrote: On 9/25/2020 2:55 PM, Jason Gunthorpe wrote: On Fri, Sep 25, 2020 at 10:13:30AM +0300, Leon Romanovsky wrote: diff --git a/tools/testing/scatterlist/main.c b/tools/testing/scatterlist/main.c index 0a1464181226..4899359a31ac 100644 +++ b/tools/testing/

Re: [PATCH 07/11] drm/i915: stop using kmap in i915_gem_object_map

2020-09-25 Thread Tvrtko Ursulin
On 24/09/2020 14:58, Christoph Hellwig wrote: kmap for !PageHighmem is just a convoluted way to say page_address, and kunmap is a no-op in that case. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-)

Re: [PATCH 06/11] drm/i915: use vmap in shmem_pin_map

2020-09-25 Thread Tvrtko Ursulin
On 24/09/2020 14:58, Christoph Hellwig wrote: shmem_pin_map somewhat awkwardly reimplements vmap using alloc_vm_area and manual pte setup. The only practical difference is that alloc_vm_area prefeaults the vmalloc area PTEs, which doesn't seem to be required here (and could be added to vmap us

Re: [PATCH 08/11] drm/i915: use vmap in i915_gem_object_map

2020-09-25 Thread Tvrtko Ursulin
On 24/09/2020 14:58, Christoph Hellwig wrote: i915_gem_object_map implements fairly low-level vmap functionality in a driver. Split it into two helpers, one for remapping kernel memory which can use vmap, and one for I/O memory that uses vmap_pfn. The only practical difference is that alloc_v

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 11:34 AM Christian König wrote: > > Am 25.09.20 um 10:18 schrieb Daniel Vetter: > > On Fri, Sep 25, 2020 at 10:16 AM Daniel Vetter wrote: > >> On Fri, Sep 25, 2020 at 9:39 AM Christian König > >> wrote: > >>> Am 25.09.20 um 01:14 schrieb Dave Airlie: > On Thu, 24 Sep

Re: [PATCH 0/3] Prevent out-of-bounds access for built-in font data buffers

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 06:13:00AM -0400, Peilin Ye wrote: > Hi all! > > On Fri, Sep 25, 2020 at 08:46:04AM +0200, Jiri Slaby wrote: > > > In order to perform a reliable range check, fbcon_get_font() needs to know > > > `FONTDATAMAX` for each built-in font under lib/fonts/. Unfortunately, we > > >

Re: [PATCH 1/6] drm/atomic: Pass the full state to CRTC atomic enable/disable

2020-09-25 Thread kernel test robot
Hi Maxime, I love your patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [cannot apply to shawnguo/for-next drm-intel/for-linux-next linus/master anholt/for-next v5.9-rc6 next-20200925] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Christian König
Am 25.09.20 um 15:17 schrieb Daniel Vetter: [SNIP] Eviction is not a problem because the driver gets asked where to put an evicted BO and then TTM does all the moving. Hm I guess then I don't quite get where you see the ping-pong happening, I thought that only happens for evicting stuff. No,

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Tvrtko Ursulin
On 25/09/2020 14:39, Maor Gottlieb wrote: On 9/25/2020 3:33 PM, Tvrtko Ursulin wrote: On 25/09/2020 13:18, Maor Gottlieb wrote: On 9/25/2020 2:55 PM, Jason Gunthorpe wrote: On Fri, Sep 25, 2020 at 10:13:30AM +0300, Leon Romanovsky wrote: diff --git a/tools/testing/scatterlist/main.c b/tool

Re: [PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-25 Thread Daniel Vetter
On Fri, Sep 25, 2020 at 3:40 PM Christian König wrote: > > Am 25.09.20 um 15:17 schrieb Daniel Vetter: > > [SNIP] > >> Eviction is not a problem because the driver gets asked where to put an > >> evicted BO and then TTM does all the moving. > > Hm I guess then I don't quite get where you see the p

Re: [Intel-gfx] [PATCH 08/11] drm/i915: use vmap in i915_gem_object_map

2020-09-25 Thread Matthew Auld
On Thu, 24 Sep 2020 at 14:59, Christoph Hellwig wrote: > > i915_gem_object_map implements fairly low-level vmap functionality in > a driver. Split it into two helpers, one for remapping kernel memory > which can use vmap, and one for I/O memory that uses vmap_pfn. > > The only practical differenc

[PATCH] drm/panel: rm68200: fix mode to 50fps

2020-09-25 Thread Yannick Fertre
Compute new timings to get a framerate of 50fps with a pixel clock @54Mhz. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raydium-rm68200.c b/drivers/gpu

CONFIG_AMDGPU triggers full rebuild

2020-09-25 Thread Thomas Zimmermann
Hi, whenever I change the option CONFIG_AMDGPU, I have to rebuild the whole kernel. I guess it auto-selects some architecture-specific feature. That full rebuild might be avoidable if I could enable that feature permanently. Any ideas what this could be and how to avoid the full rebuilt? Best re

Re: [PATCH 0/3] fbdev: stop using compat_alloc_user_space

2020-09-25 Thread Sam Ravnborg
On Fri, Sep 25, 2020 at 01:31:51PM +0200, Arnd Bergmann wrote: > On Thu, Sep 24, 2020 at 10:54 PM Sam Ravnborg wrote: > > > > Hi Daniel/Arnd. > > > > On Fri, Sep 18, 2020 at 02:48:08PM +0200, Daniel Vetter wrote: > > > On Fri, Sep 18, 2020 at 12:08:10PM +0200, Arnd Bergmann wrote: > > > > The fbde

Re: [PATCH] drm/stm: dsi: Use dev_ based logging

2020-09-25 Thread Sam Ravnborg
Hi Yannick. On Fri, Sep 25, 2020 at 12:22:33PM +0200, Yannick Fertre wrote: > Standardize on the dev_ based logging and drop the include of drm_print.h. The patchs filas to drop the include mentioned here. > Remove useless dsi_color_from_mipi function. IMO the dsi_color_from_mipi() was nice, and

Re: [PATCH 1/9] drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip()

2020-09-25 Thread Thomas Zimmermann
Hi Am 29.06.20 um 10:40 schrieb Daniel Vetter: > On Thu, Jun 25, 2020 at 02:00:03PM +0200, Thomas Zimmermann wrote: >> The memcpy's destination buffer might have a different pitch than the >> source. Support different pitches as function argument. >> >> Signed-off-by: Thomas Zimmermann > > Revie

Re: CONFIG_AMDGPU triggers full rebuild

2020-09-25 Thread Christian König
Maybe MMU notifiers? But honestly I don't know for sure. Christian. Am 25.09.20 um 16:29 schrieb Thomas Zimmermann: Hi, whenever I change the option CONFIG_AMDGPU, I have to rebuild the whole kernel. I guess it auto-selects some architecture-specific feature. That full rebuild might be avoidab

[PATCH 2/5] drm/radeon: stop using TTMs fault callback

2020-09-25 Thread Christian König
We already implemented the fault handler ourself, just open code what is necessary here. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_object.c | 22 +++ drivers/gpu/drm/radeon/radeon_object.h | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c| 29 +++

[PATCH 1/5] drm/ttm: move SG flag check into ttm_bo_vm_reserve

2020-09-25 Thread Christian König
Just check earlier if a BO can be page faulted in the first place. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 98a00

[PATCH 3/5] drm/amdgpu: stop using TTMs fault callback

2020-09-25 Thread Christian König
Implement the fault handler ourself using the provided TTM functions. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 20 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 40 +++--- 3 file

[PATCH 5/5] drm/ttm: remove fault callback

2020-09-25 Thread Christian König
Another one bites the dust. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 22 -- include/drm/ttm/ttm_bo_driver.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 991ef132e10

[PATCH 4/5] drm/nouveau: stop using TTMs fault callback

2020-09-25 Thread Christian König
We already implemented the fault handler ourself, just open code what is necessary here. Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_bo.c | 50 ++- drivers/gpu/drm/nouveau/nouveau_bo.h | 1 + drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++--- 3 f

Re: [PATCH 3/9] drm: Add simplekms driver

2020-09-25 Thread Thomas Zimmermann
Hi Daniel Am 29.06.20 um 11:06 schrieb Daniel Vetter: > On Thu, Jun 25, 2020 at 02:00:05PM +0200, Thomas Zimmermann wrote: >> The simplekms driver is a DRM driver for simplefb framebuffers as >> provided by the kernel's boot code. This driver enables basic >> graphical output on many different gra

Re: CONFIG_AMDGPU triggers full rebuild

2020-09-25 Thread Thomas Zimmermann
Hi Christian Am 25.09.20 um 16:54 schrieb Christian König: > Maybe MMU notifiers? But honestly I don't know for sure. I checked. In my current config MMU_NOTIFIERS is y and DRM_AMDGPU is n. So it shouldn't have triggered the rebuilds, I guess. Anyway, thanks for trying to help. Best regards Tho

Re: [PATCH][next] drm/i915: Fix inconsistent IS_ERR and PTR_ERR

2020-09-25 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this? Thanks -- Gustavo On 9/10/20 05:21, Gustavo A. R. Silva wrote: > Fix inconsistent IS_ERR and PTR_ERR in i915_gem_object_copy_blt(). > > The proper pointer to be passed as argument to PTR_ERR() is vma[1]. > > This bug was detected with the help of Cocci

  1   2   >