[PATCH v2] drm/panel-edp: add IVO M133NW4J-R3 panel entry

2022-07-19 Thread Steev Klimaszewski
Add an eDP panel entry for IVO M133NW4J-R3. Due to lack of documentation, use the delay_200_500_e50 timings for now. Signed-off-by: Steev Klimaszewski --- v2 - actually mark it as R3 in the change, not R2... I'm basing my information gathering off what I could find for the IVO M133NW4J panels

[PATCH] drm/panel-edp: add IVO M133NW4J-R3 panel entry

2022-07-19 Thread Steev Klimaszewski
Add an eDP panel entry for IVO M133NW4J-R3. Due to lack of documentation, use the delay_200_500_e50 timings for now. Signed-off-by: Steev Klimaszewski --- I'm basing my information gathering off what I could find for the IVO M133NW4J panels on panelook.com. R0 is glossy, and mine is not. R2

[PATCH] drm/amdgpu: use native mode for dp aux transfer

2022-07-19 Thread Zhenneng Li
When using amdgpu for e8860, the monitor sometimes haven't any signal, and the kernel reports some errors: [ 17.317302][ 2] [ T1045] [drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR* channel eq failed: 5 tries [ 17.326963][ 2] [ T1045] [drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR*

[PATCH AUTOSEL 5.4 08/16] drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Tablet 2 830

2022-07-19 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 144248515246e52a3706de1ee928af29a63794b8 ] The Lenovo Yoga Tablet 2 830F / 830L use a panel which has been mounted 90 degrees rotated. Add a quirk for this. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Link:

[PATCH AUTOSEL 5.10 13/25] drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Tablet 2 830

2022-07-19 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 144248515246e52a3706de1ee928af29a63794b8 ] The Lenovo Yoga Tablet 2 830F / 830L use a panel which has been mounted 90 degrees rotated. Add a quirk for this. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Link:

[PATCH AUTOSEL 5.15 26/42] drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Tablet 2 830

2022-07-19 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 144248515246e52a3706de1ee928af29a63794b8 ] The Lenovo Yoga Tablet 2 830F / 830L use a panel which has been mounted 90 degrees rotated. Add a quirk for this. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Link:

[PATCH AUTOSEL 5.18 35/54] drm/ssd130x: Fix pre-charge period setting

2022-07-19 Thread Sasha Levin
From: Ezequiel Garcia [ Upstream commit b68277f19e31a25312c4acccadb5cf1502e52e84 ] Fix small typo which causes the mask for the 'precharge1' setting to be used with the 'precharge2' value. Signed-off-by: Ezequiel Garcia Acked-by: Javier Martinez Canillas Signed-off-by: Javier Martinez

[PATCH AUTOSEL 5.18 32/54] drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Tablet 2 830

2022-07-19 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 144248515246e52a3706de1ee928af29a63794b8 ] The Lenovo Yoga Tablet 2 830F / 830L use a panel which has been mounted 90 degrees rotated. Add a quirk for this. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Link:

[PATCH v4 0/2] Remove the VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier

2022-07-19 Thread Jason Gunthorpe
This is the last notifier toward the drivers, replace it with a simple op callback in the vfio_device_ops. v4: - Rebase over the CCW series v3: https://lore.kernel.org/r/0-v3-7593f297c43f+56ce-vfio_unmap_notif_...@nvidia.com - Remove 'nb' doc string from ccw - Rebase on extern removal patch

[PATCH v4 2/2] vfio: Replace the iommu notifier with a device list

2022-07-19 Thread Jason Gunthorpe
Instead of bouncing the function call to the driver op through a blocking notifier just have the iommu layer call it directly. Register each device that is being attached to the iommu with the lower driver which then threads them on a linked list and calls the appropriate driver op at the right

[PATCH v4 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-19 Thread Jason Gunthorpe
Instead of having drivers register the notifier with explicit code just have them provide a dma_unmap callback op in their driver ops and rely on the core code to wire it up. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Tony Krowiak

Re: [PATCH v3 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-07-19 Thread Jason Gunthorpe
On Thu, Jul 07, 2022 at 03:37:16PM -0600, Alex Williamson wrote: > On Mon, 4 Jul 2022 21:59:03 -0300 > Jason Gunthorpe wrote: > > diff --git a/drivers/s390/cio/vfio_ccw_ops.c > > b/drivers/s390/cio/vfio_ccw_ops.c > > index b49e2e9db2dc6f..09e0ce7b72324c 100644 > > ---

Re: [PATCH 3/3] drm/panel-edp: Fix variable typo when saving hpd absent delay from DT

2022-07-19 Thread Doug Anderson
Hi, On Tue, Jul 19, 2022 at 3:45 PM Doug Anderson wrote: > > Hi, > > On Tue, Jul 19, 2022 at 1:39 PM Nícolas F. R. A. Prado > wrote: > > > > The value read from the "hpd-absent-delay-ms" property in DT was being > > saved to the wrong variable, overriding the hpd_reliable delay. Fix the > >

Re: [PATCH 3/3] drm/panel-edp: Fix variable typo when saving hpd absent delay from DT

2022-07-19 Thread Doug Anderson
Hi, On Tue, Jul 19, 2022 at 1:39 PM Nícolas F. R. A. Prado wrote: > > The value read from the "hpd-absent-delay-ms" property in DT was being > saved to the wrong variable, overriding the hpd_reliable delay. Fix the > typo. > > Fixes: 5540cf8f3e8d ("drm/panel-edp: Implement generic "edp-panel"s

Re: [PATCH 2/3] drm/panel-edp: Add panel entry for B120XAN01.0

2022-07-19 Thread Doug Anderson
Hi, On Tue, Jul 19, 2022 at 1:39 PM Nícolas F. R. A. Prado wrote: > > Add panel identification entry for the AUO B120XAN01.0 (product ID: > 0x1062) panel. > > Signed-off-by: Nícolas F. R. A. Prado > --- > > drivers/gpu/drm/panel/panel-edp.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [PATCH 1/3] drm/panel-edp: Add panel entry for R140NWF5 RH

2022-07-19 Thread Doug Anderson
Hi, On Tue, Jul 19, 2022 at 1:39 PM Nícolas F. R. A. Prado wrote: > > Add panel identification entry for the IVO R140NWF5 RH (product ID: > 0x057d) panel. > > Signed-off-by: Nícolas F. R. A. Prado > > --- > The comments on the driver indicate that the T3 timing should be set on > hpd_absent,

Re: [PATCH 3/3] drm/panel-edp: Fix variable typo when saving hpd absent delay from DT

2022-07-19 Thread André Almeida
Às 17:38 de 19/07/22, Nícolas F. R. A. Prado escreveu: > The value read from the "hpd-absent-delay-ms" property in DT was being > saved to the wrong variable, overriding the hpd_reliable delay. Fix the > typo. > > Fixes: 5540cf8f3e8d ("drm/panel-edp: Implement generic "edp-panel"s probed by >

[PATCH] dt-bindings: panel: raydium, rm67191: Add missing type to 'video-mode'

2022-07-19 Thread Rob Herring
'video-mode' is missing a type definition and is not a common property. The type is 'uint32'. Signed-off-by: Rob Herring --- .../devicetree/bindings/display/panel/raydium,rm67191.yaml | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 1/3] drm/panel-edp: Add panel entry for R140NWF5 RH

2022-07-19 Thread Nícolas F . R . A . Prado
Add panel identification entry for the IVO R140NWF5 RH (product ID: 0x057d) panel. Signed-off-by: Nícolas F. R. A. Prado --- The comments on the driver indicate that the T3 timing should be set on hpd_absent, while hpd_reliable would have a shorter time just while the HPD line stabilizes on low

[PATCH 0/3] New eDP panels and a bugfix

2022-07-19 Thread Nícolas F . R . A . Prado
This series adds two new eDP panel entries in the first two patches, and fixes a typo in the third one that prevented usage of the DT properties. Please see the note in patch 1 for a question on hpd_reliable vs. hpd_absent. Nícolas F. R. A. Prado (3): drm/panel-edp: Add panel entry for

[PATCH 2/3] drm/panel-edp: Add panel entry for B120XAN01.0

2022-07-19 Thread Nícolas F . R . A . Prado
Add panel identification entry for the AUO B120XAN01.0 (product ID: 0x1062) panel. Signed-off-by: Nícolas F. R. A. Prado --- drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index

[PATCH 3/3] drm/panel-edp: Fix variable typo when saving hpd absent delay from DT

2022-07-19 Thread Nícolas F . R . A . Prado
The value read from the "hpd-absent-delay-ms" property in DT was being saved to the wrong variable, overriding the hpd_reliable delay. Fix the typo. Fixes: 5540cf8f3e8d ("drm/panel-edp: Implement generic "edp-panel"s probed by EDID") Signed-off-by: Nícolas F. R. A. Prado ---

Re: [PATCH v1 4/6] dma-buf: Acquire wait-wound context on attachment

2022-07-19 Thread Dmitry Osipenko
On 7/15/22 09:59, Dmitry Osipenko wrote: > On 7/15/22 09:50, Christian König wrote: >> Am 15.07.22 um 02:52 schrieb Dmitry Osipenko: >>> Intel i915 GPU driver uses wait-wound mutex to lock multiple GEMs on the >>> attachment to the i915 dma-buf. In order to let all drivers utilize >>> shared >>>

Re: [PATCH v2] drm/i915/guc: support v69 in parallel to v70

2022-07-19 Thread John Harrison
On 7/18/2022 16:07, Daniele Ceraolo Spurio wrote: This patch re-introduces support for GuC v69 in parallel to v70. As this is a quick fix, v69 has been re-introduced as the single "fallback" guc version in case v70 is not available on disk and only for platforms that are out of force_probe and

Re: [PATCH] drm/amdgpu: Fix comment typo

2022-07-19 Thread Alex Deucher
Applied. Thanks! On Tue, Jul 19, 2022 at 8:34 AM Christian König wrote: > > Am 16.07.22 um 06:28 schrieb Jason Wang: > > The double `to' is duplicated in the comment, remove one. > > > > Signed-off-by: Jason Wang > > Reviewed-by: Christian König > > > --- > >

Re: [PATCH] drm/radeon: Fix comment typo

2022-07-19 Thread Alex Deucher
Applied. Thanks! On Tue, Jul 19, 2022 at 8:33 AM Christian König wrote: > > Am 16.07.22 um 05:57 schrieb Jason Wang: > > The double `have' is duplicated in line 696, remove one. > > > > Signed-off-by: Jason Wang > > Reviewed-by: Christian König > > > --- > >

Re: [PATCH v2 09/13] drm/gem: Add LRU/shrinker helper

2022-07-19 Thread Dmitry Osipenko
On 7/19/22 20:18, Rob Clark wrote: > +void > +drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object > *obj) > +{ > + WARN_ON(!mutex_is_locked(lru->lock)); Nit: What about lockdep_assert_held_once(>lock->base)) ? Otherwise, looks good! I'll use it for the DRM-SHMEM

Re: [RFC PATCH v3 1/2] drm/bridge: ti-sn65dsi86: fetch bpc using drm_atomic_state

2022-07-19 Thread Doug Anderson
Hi, On Mon, Jul 11, 2022 at 2:21 AM Dmitry Baryshkov wrote: > > Rather than reading the pdata->connector directly, fetch the connector > using drm_atomic_state. This allows us to make pdata->connector optional > (and thus supporting DRM_BRIDGE_ATTACH_NO_CONNECTOR). > > Reviewed-by: Sam Ravnborg

[PATCH v2 08/13] drm/msm/gem: Remove active refcnt

2022-07-19 Thread Rob Clark
From: Rob Clark At this point the pinned refcnt is sufficient, and the shrinker is already prepared to encounter objects which are still active according to fences attached to the resv. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 45 ++--

[PATCH v2 12/13] drm/msm/gem: Consolidate shrinker trace

2022-07-19 Thread Rob Clark
From: Rob Clark Combine separate trace events for purge vs evict into one. When we add support for purging/evicting active buffers we'll just add more info into this one trace event, rather than adding a bunch more events. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c |

[PATCH v2 09/13] drm/gem: Add LRU/shrinker helper

2022-07-19 Thread Rob Clark
From: Rob Clark Add a simple LRU helper to assist with driver's shrinker implementation. It handles tracking the number of backing pages associated with a given LRU, and provides a helper to implement shrinker_scan. A driver can use multiple LRU instances to track objects in various states, for

[PATCH v2 13/13] drm/msm/gem: Evict active GEM objects when necessary

2022-07-19 Thread Rob Clark
From: Rob Clark If we are under enough memory pressure, we should stall waiting for active buffers to become idle in order to evict. v2: Check for __GFP_ATOMIC before blocking Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 70 +-

[PATCH v2 07/13] drm/msm/gem: Consolidate pin/unpin paths

2022-07-19 Thread Rob Clark
From: Rob Clark Avoid having multiple spots where we increment/decrement pin_count (and associated LRU updating) Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c

[PATCH v2 10/13] drm/msm/gem: Convert to using drm_gem_lru

2022-07-19 Thread Rob Clark
From: Rob Clark This converts over to use the shared GEM LRU/shrinker helpers. Note that it means we are no longer tracking purgeable or willneed buffers that are active separately. But the most recently pinned buffers should be at the tail of the various LRUs, and the shrinker is already

[PATCH v2 11/13] drm/msm/gem: Unpin buffers earlier

2022-07-19 Thread Rob Clark
From: Rob Clark We've already attached the fences, so obj->resv (which shrinker checks) tells us whether they are still active. So we can unpin sooner, before we drop the queue lock. This also avoids the need to grab the obj lock in the retire path, avoiding potential for lock contention

[PATCH v2 06/13] drm/msm/gem: Rename to pin/unpin_pages

2022-07-19 Thread Rob Clark
From: Rob Clark Since that is what these fxns actually do.. they are getting *pinned* pages (as opposed to cases where we need pages, but don't need them pinned, like CPU mappings). Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 18 +-

[PATCH v2 05/13] drm/msm/gem: Rename update_inactive

2022-07-19 Thread Rob Clark
From: Rob Clark Really what this is doing is updating various LRU lists. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c

[PATCH v2 04/13] drm/msm/gem: Check for active in shrinker path

2022-07-19 Thread Rob Clark
From: Rob Clark Currently in our shrinker path we shouldn't be encountering anything that is active, but this will change in subsequent patches. So check if there are unsignaled fences. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 10 ++

[PATCH v2 03/13] drm/msm: Split out idr_lock

2022-07-19 Thread Rob Clark
From: Rob Clark Otherwise if we hit reclaim pinning objects in the submit path, we'll be blocking retire_worker trying to free a submit. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 4 ++-- drivers/gpu/drm/msm/msm_gem_submit.c | 10 --

[PATCH v2 02/13] drm/msm: Small submit cleanup

2022-07-19 Thread Rob Clark
From: Rob Clark Move more initialization into submit_create(). Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c

[PATCH v2 01/13] drm/msm: Reorder lock vs submit alloc

2022-07-19 Thread Rob Clark
From: Rob Clark This lets us drop the NORETRY. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index

[PATCH v2 00/13] drm+msm: Shrinker and LRU rework

2022-07-19 Thread Rob Clark
From: Rob Clark Mostly a resend with a small fix in the last patch (and a couple early patches drop out when rebasing). original description below: This is mostly motivated by getting drm/msm to pass an i-g-t shrinker test that I've been working on. In particular the test creates and cycles

Re: [RFC PATCH v3 2/2] drm/bridge: ti-sn65dsi86: support DRM_BRIDGE_ATTACH_NO_CONNECTOR

2022-07-19 Thread Doug Anderson
Hi, On Mon, Jul 11, 2022 at 10:23 AM Doug Anderson wrote: > > Hi, > > On Mon, Jul 11, 2022 at 2:21 AM Dmitry Baryshkov > wrote: > > > > Now as the driver does not depend on pdata->connector, add support for > > attaching the bridge with DRM_BRIDGE_ATTACH_NO_CONNECTOR. > > > > Reviewed-by: Sam

Re: [Intel-gfx] [PATCH] drm/i915/guc: support v69 in parallel to v70

2022-07-19 Thread Ceraolo Spurio, Daniele
On 7/19/2022 12:34 AM, Tvrtko Ursulin wrote: On 18/07/2022 17:41, Ceraolo Spurio, Daniele wrote: On 7/18/2022 3:02 AM, Tvrtko Ursulin wrote: Hi, On 15/07/2022 23:54, Daniele Ceraolo Spurio wrote: This patch re-introduces support for GuC v69 in parallel to v70. As this is a quick fix,

Re: [PATCH v2] drm/bridge: it6505: Add i2c api power on check

2022-07-19 Thread Robert Foss
On Wed, 13 Jul 2022 at 05:16, allen wrote: > > From: allen chen > > Use i2c bus to read/write when it6505 power off will occur i2c error. > Add this check will prevent i2c error when it6505 power off. > > Signed-off-by: Pin-Yen Lin > Signed-off-by: Allen Chen > Reviewed-by: Robert Foss > ---

Re: [PATCH 3/3] drm/gud: Fix endianness in gud_xrgb8888_to_color() helper

2022-07-19 Thread Noralf Trønnes
Den 08.07.2022 20.21, skrev Geert Uytterhoeven: > DRM formats are defined to be little-endian, unless the > DRM_FORMAT_BIG_ENDIAN flag is set. Hence when converting from one > format to another, multi-byte pixel values loaded from memory must be > converted from little-endian to host-endian.

Re: [PATCH V2 0/3] DSI host and peripheral initialisation ordering

2022-07-19 Thread Dave Stevenson
Hi Lucas On Fri, 10 Jun 2022 at 08:52, Lucas Stach wrote: > > Hi, > > Am Mittwoch, dem 11.05.2022 um 16:58 +0200 schrieb Marek Szyprowski: > > Hi Dave, > > > > On 05.04.2022 13:43, Dave Stevenson wrote: > > > On Fri, 18 Mar 2022 at 12:25, Dave Stevenson > > > wrote: > > > > On Fri, 4 Mar 2022

Re: [PATCH v1 11/12] drm/bridge: Drop drm_bridge_funcs.mode_fixup

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:58, Sam Ravnborg wrote: > > All users are converted over to drm_bridge_funcs.atomic_check() > so it is safe to drop the mode_fixup support. > > Update the comment for atomic_check with relevant parts from mode_fixup. > > Signed-off-by: Sam Ravnborg Reviewed-by: Dave

Re: [PATCH v1 09/12] drm/rcar-du: lvds: Use drm_bridge_funcs.atomic_check

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:58, Sam Ravnborg wrote: > > Replace the deprecated drm_bridge_funcs.mode_fixup() with > drm_bridge_funcs.atomic_check(). > The driver implements the state operations, so no other changes > are required for the replacement. > > Signed-off-by: Sam Ravnborg Reviewed-by:

Re: [PATCH 3/4] dt-bindings: panel: Add LG SW43408 MIPI-DSI panel

2022-07-19 Thread Rob Herring
On Mon, 18 Jul 2022 22:30:50 +0100, Caleb Connolly wrote: > From: Sumit Semwal > > LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel. > > Signed-off-by: Vinod Koul > Signed-off-by: Sumit Semwal > [caleb: convert to yaml] > Signed-off-by: Caleb Connolly > --- >

Re: [PATCH v1 08/12] drm/mediatek: Drop mtk_hdmi_bridge_mode_fixup

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:58, Sam Ravnborg wrote: > > The implementation of drm_bridge_funcs.mode_fixup is optional > so there is no need to provide an empty implementation. > Drop mtk_hdmi_bridge_mode_fixup() so the driver no longer uses the > deprecated drm_bridge_funcs.mode_fixup() operation.

Re: [PATCH v1 07/12] drm/bridge: tc358767: Use drm_bridge_funcs.atomic_check

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:45, Sam Ravnborg wrote: > > When atomic_check() is defined, then mode_fixup() is ignored, > so it had no effect that drm_bridge_funcs.mode_fixup was assigned. > Embed the original implementation in the caller and drop the function. > > Signed-off-by: Sam Ravnborg

[PATCH v4 4/7] drm/i915: Check for integer truncation on the configuration of ttm place

2022-07-19 Thread Gwan-gyeong Mun
There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as

[PATCH v4 7/7] drm/i915: Remove truncation warning for large objects

2022-07-19 Thread Gwan-gyeong Mun
From: Chris Wilson Having addressed the issues surrounding incorrect types for local variables and potential integer truncation in using the scatterlist API, we have closed all the loop holes we had previously identified with dangerously large object creation. As such, we can eliminate the

[PATCH v4 6/7] drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large

2022-07-19 Thread Gwan-gyeong Mun
The ttm_bo_init_reserved() functions returns -ENOSPC if the size is too big to add vma. The direct function that returns -ENOSPC is drm_mm_insert_node_in_range(). To handle the same error as other code returning -E2BIG when the size is too large, it converts return value to -E2BIG.

[PATCH v4 3/7] drm/i915: Check for integer truncation on scatterlist creation

2022-07-19 Thread Gwan-gyeong Mun
From: Chris Wilson There is an impedance mismatch between the scatterlist API using unsigned int and our memory/page accounting in unsigned long. That is we may try to create a scatterlist for a large object that overflows returning a small table into which we try to fit very many pages. As the

[PATCH v4 5/7] drm/i915: Check if the size is too big while creating shmem file

2022-07-19 Thread Gwan-gyeong Mun
The __shmem_file_setup() function returns -EINVAL if size is greater than MAX_LFS_FILESIZE. To handle the same error as other code that returns -E2BIG when the size is too large, it add a code that returns -E2BIG when the size is larger than the size that can be handled. v4: If BITS_PER_LONG is

[PATCH v4 2/7] drm/i915/gem: Typecheck page lookups

2022-07-19 Thread Gwan-gyeong Mun
From: Chris Wilson We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead of a more suitable long. Be pedantic and add integer typechecking to the lookup so that we can be sure that we are safe.

[PATCH v4 1/7] drm: Move and add a few utility macros into drm util header

2022-07-19 Thread Gwan-gyeong Mun
It moves overflows_type utility macro into drm util header from i915_utils header. The overflows_type can be used to catch the truncation between data types. And it adds safe_conversion() macro which performs a type conversion (cast) of an source value into a new variable, checking that the

[PATCH v4 0/7] Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation

2022-07-19 Thread Gwan-gyeong Mun
This patch series fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation, etc. We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead

Re: [PATCH v1 06/12] drm/bridge: cros-ec-anx7688: Use drm_bridge_funcs.atomic_check

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:45, Sam Ravnborg wrote: > > Replace the deprecated drm_bridge_funcs.mode_fixup() with > drm_bridge_funcs.atomic_check(). > > drm_bridge_funcs.atomic_check() requires the atomic state operations, > update these to the default implementations. > > Signed-off-by: Sam

Re: [PATCH v1 05/12] drm/bridge: sii8620: Use drm_bridge_funcs.atomic_check

2022-07-19 Thread Dave Stevenson
On Sun, 17 Jul 2022 at 18:45, Sam Ravnborg wrote: > > Replace the deprecated drm_bridge_funcs.mode_fixup() with > drm_bridge_funcs.atomic_check(). > > drm_bridge_funcs.atomic_check() requires the atomic state operations, > update these to the default implementations. > > Signed-off-by: Sam

Re: [PATCH V2 0/3] DSI host and peripheral initialisation ordering

2022-07-19 Thread Dave Stevenson
Hi Sam On Mon, 18 Jul 2022 at 21:52, Sam Ravnborg wrote: > > Hi Dave, > > a long overdue reply on this series. > > On Fri, Mar 04, 2022 at 03:17:55PM +, Dave Stevenson wrote: > > Hi All > > > > Changes from v1: > > - New patch to refactor drm_bridge_chain_post_disable and > >

Re: [PATCH v2 1/2] drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt()

2022-07-19 Thread Robert Foss
On Tue, 19 Jul 2022 at 08:55, Liang He wrote: > > In anx7625_parse_dt(), 'pdata->mipi_host_node' will be assigned a > new reference with of_graph_get_remote_node() which will increase > the refcount of the object, correspondingly, we should call > of_node_put() for the old reference stored in the

Re: [PATCH] drm/amdgpu: Fix comment typo

2022-07-19 Thread Christian König
Am 16.07.22 um 06:28 schrieb Jason Wang: The double `to' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] drm/radeon: Fix comment typo

2022-07-19 Thread Christian König
Am 16.07.22 um 05:57 schrieb Jason Wang: The double `have' is duplicated in line 696, remove one. Signed-off-by: Jason Wang Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 1/9] drm/panel/panel-sitronix-st7701: Make DSI mode flags common to ST7701

2022-07-19 Thread Marek Vasut
On 7/19/22 10:39, Linus Walleij wrote: On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut wrote: The ST7701 and ST7701S are TFT matrix drivers with integrated multi protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line TFT matrix output. Currently the only supported input is DSI. The

Re: [PATCH v2 07/12] drm: bridge: samsung-dsim: Add module init, exit

2022-07-19 Thread Jagan Teki
On Mon, May 9, 2022 at 5:35 PM Marek Szyprowski wrote: > > On 04.05.2022 13:40, Jagan Teki wrote: > > Add module init and exit functions for the bridge to register > > and unregister dsi_driver. > > > > Exynos drm driver stack will register the platform_driver separately > > in the common of it's

Re: [PATCH v7 7/9] drm/virtio: Improve DMA API usage for shmem BOs

2022-07-19 Thread Dmitry Osipenko
On 7/19/22 13:31, Gerd Hoffmann wrote: > On Wed, Jul 06, 2022 at 10:22:52AM +0300, Dmitry Osipenko wrote: >> On 7/6/22 10:13, Gerd Hoffmann wrote: >>> Hi, >>> Gerd, thank you very much! It's was indeed unclear to me how to test the MMIO GPU, but yours variant with microvm works! I was

Re: [PATCH v1 12/12] drm/todo: Add bridge related todo items

2022-07-19 Thread Dave Stevenson
Hi Sam On Mon, 18 Jul 2022 at 19:00, Sam Ravnborg wrote: > > Hi Dave, > > On Mon, Jul 18, 2022 at 11:27:37AM +0100, Dave Stevenson wrote: > > Hi Sam > > > > On Sun, 17 Jul 2022 at 18:58, Sam Ravnborg wrote: > > > > > > Add todo in the hope someone will help updating the bridge drivers. > > > >

Re: [PATCH v7 7/9] drm/virtio: Improve DMA API usage for shmem BOs

2022-07-19 Thread Gerd Hoffmann
On Wed, Jul 06, 2022 at 10:22:52AM +0300, Dmitry Osipenko wrote: > On 7/6/22 10:13, Gerd Hoffmann wrote: > > Hi, > > > >> Gerd, thank you very much! It's was indeed unclear to me how to test the > >> MMIO GPU, but yours variant with microvm works! I was looking for trying > >> aarch64 in the

Re: [Intel-gfx] [PATCH 0/2] drm/i915/gt: Expose per gt defaults in sysfs

2022-07-19 Thread Rodrigo Vivi
On Mon, Jul 18, 2022 at 06:07:06PM -0700, Ashutosh Dixit wrote: > Create a gt/gtN/.defaults/ directory (similar to > engine//.defaults/) to expose default parameter values for each > gt in sysfs. This allows userspace to restore default parameter values > after they may have changed. > > Patch 1:

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Thomas Zimmermann
Hi Am 19.07.22 um 11:52 schrieb Daniel Vetter: On Mon, 18 Jul 2022 at 08:56, Thomas Zimmermann wrote: Hi Am 16.07.22 um 20:17 schrieb Sam Ravnborg: While discussing the way forward for the via driver Javier came up with the proposal to move all DRI1 drivers to their own folder. The idea

Re: [Intel-gfx] [PATCH 02/12] drm/i915/guc: Don't call ring_is_idle in GuC submission

2022-07-19 Thread Tvrtko Ursulin
On 19/07/2022 10:49, Tvrtko Ursulin wrote: On 19/07/2022 01:09, John Harrison wrote: On 7/18/2022 05:26, Tvrtko Ursulin wrote: On 13/07/2022 00:31, john.c.harri...@intel.com wrote: From: Matthew Brost The engine registers really shouldn't be touched during GuC submission as the GuC owns

[PATCH v3 3/3] drm/i915: Use luminance range calculated during edid parsing

2022-07-19 Thread Jouni Högander
Instead of using fixed 0 - 512 range use luminance range calculated as a part of edid parsing. As a backup fall back to static 0 - 512. v3: Clean-ups suggested by Jani Nikula v2: Use values calculated during edid parsing Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Manasi Navare

[PATCH v3 2/3] drm/amdgpu_dm: Rely on split out luminance calculation function

2022-07-19 Thread Jouni Högander
Luminance range calculation was split out into drm_edid.c and is now part of edid parsing. Rely on values calculated during edid parsing and use these for caps->aux_max_input_signal and caps->aux_min_input_signal. v2: Use values calculated during edid parsing Cc: Roman Li Cc: Rodrigo Siqueira

[PATCH v3 1/3] drm: New function to get luminance range based on static hdr metadata

2022-07-19 Thread Jouni Högander
Split luminance min/max calculation using static hdr metadata from drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:update_connector_ext_caps into drm/drm_edid.c and use it during edid parsing. Calculated range is stored into connector->display_info->luminance_range. Add new data structure

[PATCH v3 0/3] HDR aux backlight range calculation

2022-07-19 Thread Jouni Högander
This patch set splits out static hdr metadata backlight range parsing from gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c into gpu/drm/drm-edid.c as a new function. This new function is then used during edid parsing when HDR static metadata block parsing. Calculated values are stored in a new struct

Re: [Intel-gfx] [PATCH 10/12] drm/i915/guc: Support larger contexts on newer hardware

2022-07-19 Thread Tvrtko Ursulin
On 19/07/2022 01:13, John Harrison wrote: On 7/18/2022 05:35, Tvrtko Ursulin wrote: On 13/07/2022 00:31, john.c.harri...@intel.com wrote: From: Matthew Brost The GuC needs a copy of a golden context for implementing watchdog resets (aka media resets). This context is larger on newer

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Daniel Vetter
On Mon, 18 Jul 2022 at 08:56, Thomas Zimmermann wrote: > > Hi > > Am 16.07.22 um 20:17 schrieb Sam Ravnborg: > > While discussing the way forward for the via driver > > Javier came up with the proposal to move all DRI1 drivers > > to their own folder. > > > > The idea is to move the old DRI1

Re: [Intel-gfx] [PATCH 02/12] drm/i915/guc: Don't call ring_is_idle in GuC submission

2022-07-19 Thread Tvrtko Ursulin
On 19/07/2022 01:09, John Harrison wrote: On 7/18/2022 05:26, Tvrtko Ursulin wrote: On 13/07/2022 00:31, john.c.harri...@intel.com wrote: From: Matthew Brost The engine registers really shouldn't be touched during GuC submission as the GuC owns the registers. Don't call ring_is_idle and

[PATCH] drm/vmwgfx: clean up some error pointer checking

2022-07-19 Thread Dan Carpenter
The vmw_user_bo_noref_lookup() function cannot return NULL. If it could, then this function would return PTR_ERR(NULL) which is success. Returning success without initializing "*vmw_bo_p = vmw_bo;" would lead to an uninitialized variable bug in the caller. Smatch complains about this:

Re: [Intel-gfx] [PATCH 01/12] drm/i915: Remove bogus GEM_BUG_ON in unpark

2022-07-19 Thread Tvrtko Ursulin
On 19/07/2022 01:05, John Harrison wrote: On 7/18/2022 05:15, Tvrtko Ursulin wrote: On 13/07/2022 00:31, john.c.harri...@intel.com wrote: From: Matthew Brost Remove bogus GEM_BUG_ON which compared kernel context timeline seqno to seqno in memory on engine PM unpark. If a GT reset occurred

Re: [PATCH v1 0/6] Move all drivers to a common dma-buf locking convention

2022-07-19 Thread Tomasz Figa
On Fri, Jul 15, 2022 at 9:53 AM Dmitry Osipenko wrote: > > Hello, > > This series moves all drivers to a dynamic dma-buf locking specification. > From now on all dma-buf importers are made responsible for holding > dma-buf's reservation lock around all operations performed over dma-bufs. > This

Re: [PATCH 2/4] arm64: dts: qcom: add sdm845-google-blueline (Pixel 3)

2022-07-19 Thread Krzysztof Kozlowski
On 18/07/2022 23:30, Caleb Connolly wrote: > From: Amit Pundir > > This adds an initial dts for the Blueline (Pixel 3). Supported > functionality includes display, Debug UART, UFS, USB-C (peripheral), WiFi, > Bluetooth and modem. > Thank you for your patch. There is something to

Re: [PATCH v9 06/14] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-19 Thread David Hildenbrand
On 18.07.22 22:32, Andrew Morton wrote: > On Mon, 18 Jul 2022 12:56:29 +0200 David Hildenbrand wrote: > >>> /* >>> * Try to move out any movable page before pinning the range. >>> */ >>> @@ -1919,7 +1948,8 @@ static long

Re: [PATCH 1/9] drm/panel/panel-sitronix-st7701: Make DSI mode flags common to ST7701

2022-07-19 Thread Linus Walleij
On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut wrote: > The ST7701 and ST7701S are TFT matrix drivers with integrated multi > protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line > TFT matrix output. Currently the only supported input is DSI. > > The protocol decoder is separate

Re: [PATCH 1/4] Documentation: dt-bindings: arm: qcom: add google,blueline

2022-07-19 Thread Krzysztof Kozlowski
On 18/07/2022 23:30, Caleb Connolly wrote: > Document the bindings for the Pixel 3 > > Based on > https://lore.kernel.org/all/20220521164550.91115-7-krzysztof.kozlow...@linaro.org/ Thanks for mention dependency. However this should not go to the final commit, thus please put such references

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Javier Martinez Canillas
On 7/19/22 10:05, Thomas Zimmermann wrote: >>> [...] >> >> I will update the series with the following: >> - Drop drm/dri1/ >> - Keep the CONFIG_DRM_* change and keep the DRIVER_DRI1 change >> - All config options for DRI1 drivers will get a CONFIG_DRM_DRI1_* >>prefix >> - Convert at least

[PATCH] docs: driver-api: firmware: add driver firmware guidelines. (v2)

2022-07-19 Thread Dave Airlie
From: Dave Airlie A recent snafu where Intel ignored upstream feedback on a firmware change, led to a late rc6 fix being required. In order to avoid this in the future we should document some expectations around linux-firmware. I was originally going to write this for drm, but it seems quite

Re: [PATCH] docs: driver-api: firmware: add driver firmware guidelines.

2022-07-19 Thread Dave Airlie
> > +* Firmware should be versioned with at least a major/minor version. It > > + is suggested that the firmware files in linux-firmware be named with > > + some device specific name, and just the major version. The > > + major/minor/patch versions should be stored in a header in the > > +

Re: [PATCH] docs: driver-api: firmware: add driver firmware guidelines.

2022-07-19 Thread Dave Airlie
On Tue, 19 Jul 2022 at 08:04, Jakub Kicinski wrote: > > On Mon, 18 Jul 2022 11:33:11 +0200 Thorsten Leemhuis wrote: > > > If the hardware isn't > > > + enabled by default or under development, > > > > Wondering if it might be better to drop the "or under development", as > > the "enabled by

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Thomas Zimmermann
Hi Sam Am 19.07.22 um 09:55 schrieb Sam Ravnborg: Hi Javier, Thomas, On Mon, Jul 18, 2022 at 02:18:13PM +0200, Javier Martinez Canillas wrote: On 7/18/22 12:50, Thomas Zimmermann wrote: [...] To be honest, I still don't like this rename. Especially in the case of via, which has a KMS

Re: [PATCH 3/4] dt-bindings: panel: Add LG SW43408 MIPI-DSI panel

2022-07-19 Thread Sam Ravnborg
Hi Caleb, On Tue, Jul 19, 2022 at 08:10:18AM +0200, Sam Ravnborg wrote: > Hi Caleb, > > On Mon, Jul 18, 2022 at 10:30:50PM +0100, Caleb Connolly wrote: > > From: Sumit Semwal > > > > LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel. > A few things to improve to this binding. > > Sam > >

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Sam Ravnborg
Hi Javier, Thomas, On Mon, Jul 18, 2022 at 02:18:13PM +0200, Javier Martinez Canillas wrote: > On 7/18/22 12:50, Thomas Zimmermann wrote: > > [...] > > >>> To be honest, I still don't like this rename. Especially in the case of > >>> via, which has a KMS driver coming up. It will now have an

Re: [PATCH 4/4] drm: panel: Add lg sw43408 panel driver

2022-07-19 Thread Sam Ravnborg
Hi Caleb, On Mon, Jul 18, 2022 at 10:30:51PM +0100, Caleb Connolly wrote: > From: Sumit Semwal > > LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel, used in some Pixel3 > phones. Thanks for submitting this. When reading the code it is obvious that this was based on an older panel and there is a

RE: [Intel-gfx] [PATCH v2 01/21] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-07-19 Thread David Laight
From: Tvrtko Ursulin > Sent: 19 July 2022 08:25 ... > > It's not only the TLB flushes that cause grief. > > > > There is a loop that forces a write-back of all the frame buffer pages. > > With a large display and some cpu (like my Ivy bridge one) that > > takes long enough with pre-emption

Re: linux-next: manual merge of the drm tree with the drm-misc-fixes tree

2022-07-19 Thread Geert Uytterhoeven
Hi Stephen, On Mon, Jul 18, 2022 at 1:49 AM Stephen Rothwell wrote: > On Mon, 11 Jul 2022 10:05:45 +0200 Christian König > wrote: > > Am 11.07.22 um 04:47 schrieb Stephen Rothwell: > > > > > > Today's linux-next merge of the drm tree got a conflict in: > > > > > >

Re: [Intel-gfx] [PATCH] drm/i915/guc: support v69 in parallel to v70

2022-07-19 Thread Tvrtko Ursulin
On 18/07/2022 17:41, Ceraolo Spurio, Daniele wrote: On 7/18/2022 3:02 AM, Tvrtko Ursulin wrote: Hi, On 15/07/2022 23:54, Daniele Ceraolo Spurio wrote: This patch re-introduces support for GuC v69 in parallel to v70. As this is a quick fix, v69 has been re-introduced as the single

[PATCH] video/fbdev/sis: fix typos in SiS_GetModeID()

2022-07-19 Thread Rustam Subkhankulov
The second operand of a '&&' operator has no impact on expression result for cases 400 and 512 in SiS_GetModeID(). Judging by the logic and the names of the variables, in both cases a typo was made. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam

  1   2   >