[PATCH][next] nouveau/svm: Use struct_size() helper in nouveau_pfns_map()

2022-02-07 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worse scenario, could lead to heap overflows. Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/d

Re: [Intel-gfx] [PATCH 4/4] drm/i915/guc: Verify hwconfig blob matches supported format

2022-02-07 Thread kernel test robot
Hi Jordan, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next v5.17-rc3 next-20220207] [cannot apply to airlied/drm-next] [If your

Re: [PATCH 5/8] mm: simplify freeing of devmap managed pages

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > Make put_devmap_managed_page return if it took charge of the page > or not and remove the separate page_is_devmap_managed helper. Looks good to me: Reviewed-by: Dan Williams

Re: [PATCH 6/8] mm: don't include in

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > Move the check for the actual pgmap types that need the free at refcount > one behavior into the out of line helper, and thus avoid the need to > pull memremap.h into mm.h. Looks good to me assuming the compile bots agree. Reviewed-by:

Re: [Intel-gfx] [PATCH 3/4] drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item

2022-02-07 Thread kernel test robot
Hi Jordan, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next v5.17-rc3 next-20220207] [cannot apply to airlied/drm-next] [If your

Re: [PATCH v1 0/3] Add support for eDP PHY on SC7280 platform

2022-02-07 Thread Doug Anderson
Hi, On Wed, Feb 2, 2022 at 1:54 PM Stephen Boyd wrote: > > Quoting Sankeerth Billakanti (2021-11-15 23:07:35) > > This series adds support for the eDP PHY on Qualcomm SC7280 platform. > > The changes are dependent on v4 of the new eDP PHY driver introduced by > > Bjorn: > > https://patchwork.ker

Re: [PATCH v1 1/9] drm/bridge: add DRM_BRIDGE_STATE_OPS macro

2022-02-07 Thread Laurent Pinchart
Hi Sam, Thank you for the patch. On Sun, Feb 06, 2022 at 04:43:57PM +0100, Sam Ravnborg wrote: > The DRM_BRIDGE_STATE_OPS can be used as shortcut for bridge drivers that > do not subclass drm_bridge_state to assign the default operations for > reset, duplicate and destroy of the state. > > Signe

Re: [PATCH v1 2/9] drm: add drm specific media-bus-format header file

2022-02-07 Thread Laurent Pinchart
Hi Sam, Thank you for the patch. On Sun, Feb 06, 2022 at 04:43:58PM +0100, Sam Ravnborg wrote: > For now the header file includes a single method to retreive the bpc s/retreive/retrieve/ > from the bus format. > The supported MEDIA_BUS_* codes are the ones used for the current panels > in DRM.

Re: [PATCH v1 3/9] drm: add drm_atomic_helper_bridge_dsi_input_bus_fmt

2022-02-07 Thread Laurent Pinchart
Hello, On Mon, Feb 07, 2022 at 02:32:45PM -0800, Doug Anderson wrote: > On Sun, Feb 6, 2022 at 7:44 AM Sam Ravnborg wrote: > > > > There is a number of bridge drivers that supports a single media bus > > format for DSI. Add a helper to avoid duplicating the code. > > > > Signed-off-by: Sam Ravnbo

Re: [PATCH v1 4/9] drm/bridge: ti-sn65dsi86: Use atomic variants of drm_bridge_funcs

2022-02-07 Thread Laurent Pinchart
Hi Sam, Thank you for the patch. On Sun, Feb 06, 2022 at 04:44:00PM +0100, Sam Ravnborg wrote: > Move away from the deprecated enable/diable operations in s/diable/disable/ > drm_bridge_funcs and enable atomic use. > > Signed-off-by: Sam Ravnborg > Cc: Douglas Anderson > Cc: Andrzej Hajda >

Re: [PATCH v1 9/9] drm/bridge: Drop unused drm_bridge_chain functions

2022-02-07 Thread Laurent Pinchart
Hi Sam, Thank you for the patch. On Sun, Feb 06, 2022 at 04:44:05PM +0100, Sam Ravnborg wrote: > The drm_bridge_chain_{pre_enable,enable,disable,post_disable} has no > users left and we have atomic variants that should be used. > Drop them so they do not gain new users. > > Adjust a few comments

Re: [PATCH v1 6/9] drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support

2022-02-07 Thread Laurent Pinchart
Hello, On Mon, Feb 07, 2022 at 02:34:34PM -0800, Doug Anderson wrote: > On Sun, Feb 6, 2022 at 7:44 AM Sam Ravnborg wrote: > > > > From: Rob Clark > > > > Slightly awkward to fish out the display_info when we aren't creating > > own connector. But I don't see an obvious better way. > > > > v3:

[PATCH -next] drm/msm/dpu: clean up some inconsistent indenting

2022-02-07 Thread Yang Li
Eliminate the follow smatch warning: drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:411 _dpu_crtc_blend_setup_mixer() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH v2 1/3] drm/bridge: ti-sn65dsi86: Use drm_bridge_connector

2022-02-07 Thread Laurent Pinchart
Hi Doug, Thank you for the patch. On Fri, Feb 04, 2022 at 04:13:40PM -0800, Douglas Anderson wrote: > The ti-sn65dsi86 driver shouldn't hand-roll its own bridge > connector. It should use the normal drm_bridge_connector. Let's switch > to do that, removing all of the custom code. > > NOTE: this

Re: [PATCH -next] drm/msm/dpu: clean up some inconsistent indenting

2022-02-07 Thread Abhinav Kumar
On 2/7/2022 5:23 PM, Yang Li wrote: Eliminate the follow smatch warning: drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:411 _dpu_crtc_blend_setup_mixer() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/

Re: [PATCH v2 2/3] drm: Plumb debugfs_init through to panels

2022-02-07 Thread Laurent Pinchart
Hi Douglas, Thank you for the patch. On Fri, Feb 04, 2022 at 04:13:41PM -0800, Douglas Anderson wrote: > We'd like panels to be able to add things to debugfs underneath the > connector's directory. Let's plumb it through. A panel will be able to > put things in a "panel" directory under the conne

[PATCH] drm/i915/guc: Fix flag query to not modify state

2022-02-07 Thread John . C . Harrison
From: John Harrison A flag query helper was actually writing to the flags word rather than just reading. Fix that. Also update the function's comment as it was out of date. Fixes: 0f7976506de61 ("drm/i915/guc: Rework and simplify locking") Signed-off-by: John Harrison --- drivers/gpu/drm/i915/

Re: [PATCH v8 00/10] vgaarb: Rework default VGA device selection

2022-02-07 Thread Huacai Chen
Hi, Bjorn, On Tue, Feb 8, 2022 at 1:59 AM Bjorn Helgaas wrote: > > On Tue, Feb 01, 2022 at 04:46:33PM +0100, Maarten Lankhorst wrote: > > Op 31-01-2022 om 23:23 schreef Bjorn Helgaas: > > > [+to Maarten, Maxime, Thomas; beginning of thread: > > > https://lore.kernel.org/r/20220106000658.243509-1-

[PATCH 0/8] Prep work for next GuC release

2022-02-07 Thread John . C . Harrison
From: John Harrison The next GuC firmware release includes some significant backwards breaking API changes. One such is that there is no longer an LRC descriptor pool. A bunch of prep work for that change can be done in advance - the descriptor pool was being used for things it shouldn't really h

[PATCH 1/8] drm/i915/guc: Do not conflate lrc_desc with GuC id for registration

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor pool is going away. So, stop using it as a check for context registration, use the GuC id instead (being the thing that actually gets registered with the GuC). Signed-off-by: John Harrison --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 69 ++-

[PATCH 4/8] drm/i915/guc: Split guc_lrc_desc_pin apart

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor pool is going away. Further, the function that was populating it was also doing a bunch of logic about the context registration sequence. So, split that code apart into separate state setup and try to register functions. Note that some of those 'try to regis

[PATCH 6/8] drm/i915/guc: Rename desc_idx to ctx_id

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor pool is going away. So, stop naming context ids as descriptor pool indecies. While at it, add a bunch of missing line feeds to some error messages. Signed-off-by: John Harrison --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 56 +-- 1

[PATCH 5/8] drm/i915/guc: Move lrc desc setup to where it is needed

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor was being initialised early on in the context registration sequence. It could then be determined that the actual registration needs to be delayed and the descriptor would be wiped out. This is inefficient, so move the setup to later in the process after the

[PATCH 3/8] drm/i915/guc: Better name for context id limit

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor pool is going away. So, stop using it as the limit for how many context ids are available. While at it, also update a kzalloc(sizeof()*count) to be a kcalloc(count,size). Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_context.c |

[PATCH 2/8] drm/i915/guc: Add an explicit 'submission_initialized' flag

2022-02-07 Thread John . C . Harrison
From: John Harrison The LRC descriptor pool is going away. So, stop using it as a check for whether submission has been initialised or not. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8 +---

[PATCH 8/8] drm/i915/guc: Fix potential invalid pointer dereferences when decoding G2Hs

2022-02-07 Thread John . C . Harrison
From: John Harrison Some G2H handlers were reading the context id field from the payload before checking the payload met the minimum length required. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH 7/8] drm/i915/guc: Drop obsolete H2G definitions

2022-02-07 Thread John . C . Harrison
From: John Harrison The CTB registration process changed significantly a while back using a single KLV based H2G. So drop the original and now obsolete H2G definitions. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 2 -- 1 file changed, 2 deletions(-) dif

Re: [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount

2022-02-07 Thread Ralph Campbell
On 2/6/22 22:32, Christoph Hellwig wrote: ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a page is not being used (gup, compaction, migration, etc.). Clean up the c

Re: [PATCH] [RFC] drm: mxsfb: Implement LCDIF scanout CRC32 support

2022-02-07 Thread Liu Ying
On Mon, 2022-02-07 at 11:43 +0100, Marek Vasut wrote: > On 2/7/22 10:18, Liu Ying wrote: > > Hi, > > > > > On Sun, 2022-02-06 at 19:56 +0100, Marek Vasut wrote: > > > > > The LCDIF controller as present in i.MX6SX/i.MX8M Mini/Nano > > > > > has a > > > > > CRC_STAT > > > > > register, which conta

Re: [PATCH] [RFC] drm: mxsfb: Implement LCDIF scanout CRC32 support

2022-02-07 Thread Laurent Pinchart
Hello Liu Ying, On Tue, Feb 08, 2022 at 10:41:59AM +0800, Liu Ying wrote: > On Mon, 2022-02-07 at 11:43 +0100, Marek Vasut wrote: > > On 2/7/22 10:18, Liu Ying wrote: > > > > > On Sun, 2022-02-06 at 19:56 +0100, Marek Vasut wrote: > > > > > > The LCDIF controller as present in i.MX6SX/i.MX8M Mini/

Re: [Intel-gfx] [PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-07 Thread kernel test robot
Hi Michael, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm/drm-next v5.17-rc3 next-20220207] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we

Re: [Intel-gfx] [PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-07 Thread kernel test robot
Hi Michael, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm/drm-next v5.17-rc3 next-20220207] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we

[PATCH 1/2] drm: Add HPD state to drm_connector_oob_hotplug_event()

2022-02-07 Thread Bjorn Andersson
In some implementations, such as the Qualcomm platforms, the display driver has no way to query the current HPD state and as such it's impossible to distinguish between disconnect and attention events. Add a parameter to drm_connector_oob_hotplug_event() to pass the HPD state. Also push the test

[PATCH 2/2] drm/msm/dp: Implement oob_hotplug_event()

2022-02-07 Thread Bjorn Andersson
The Qualcomm DisplayPort driver contains traces of the necessary plumbing to hook up USB HPD, in the form of the dp_hpd module and the dp_usbpd_cb struct. Use this as basis for implementing the oob_hotplug_event() callback, by amending the dp_hpd module with the missing logic. Overall the solution

Re: [RFC v3 06/12] drm/amdgpu: Drop hive->in_reset

2022-02-07 Thread Lazar, Lijo
On 1/26/2022 4:07 AM, Andrey Grodzovsky wrote: Since we serialize all resets no need to protect from concurrent resets. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +-- drivers/gpu/drm/amd/amdgpu/amdgpu

Re: [RFC PATCH 1/3] drm: Extract amdgpu_sa.c as a generic suballocation helper

2022-02-07 Thread Christian König
Am 07.02.22 um 12:18 schrieb Maarten Lankhorst: Op 04-02-2022 om 19:29 schreef Christian König: [SNIP] I think we should put that into a separate module like we now do with other helpers as well. Can easily be done, it will likely be a very small helper. The code itself is just under a pag

Re: [PATCH v2 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects

2022-02-07 Thread Christian König
Am 08.02.22 um 04:14 schrieb zhanglianjie: after the buffer object is successfully mapped, call radeon_bo_kunmap before the function returns. Signed-off-by: zhanglianjie Reviewed-by: Christian König diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c i

[PATCH v7 1/3] gpu: drm: separate panel orientation property creating and value setting

2022-02-07 Thread Hsin-Yi Wang
drm_dev_register() sets connector->registration_state to DRM_CONNECTOR_REGISTERED and dev->registered to true. If drm_connector_set_panel_orientation() is first called after drm_dev_register(), it will fail several checks and results in following warning. Add a function to create panel orientation

[PATCH v7 2/3] drm/mediatek: init panel orientation property

2022-02-07 Thread Hsin-Yi Wang
Init panel orientation property after connector is initialized. Let the panel driver decides the orientation value later. Signed-off-by: Hsin-Yi Wang Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/mediate

[PATCH v7 3/3] arm64: dts: mt8183: Add panel rotation

2022-02-07 Thread Hsin-Yi Wang
krane, kakadu, and kodama boards have a default panel rotation. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Tested-by: Enric Balletbo i Serra --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/

Re: [PATCH 2/2] drm/msm/dp: Implement oob_hotplug_event()

2022-02-07 Thread Greg Kroah-Hartman
On Mon, Feb 07, 2022 at 08:43:28PM -0800, Bjorn Andersson wrote: > The Qualcomm DisplayPort driver contains traces of the necessary > plumbing to hook up USB HPD, in the form of the dp_hpd module and the > dp_usbpd_cb struct. Use this as basis for implementing the > oob_hotplug_event() callback, by

Re: [Intel-gfx] [PATCH v7 1/3] gpu: drm: separate panel orientation property creating and value setting

2022-02-07 Thread Ville Syrjälä
On Tue, Feb 08, 2022 at 03:37:12PM +0800, Hsin-Yi Wang wrote: > +int drm_connector_init_panel_orientation_property( > + struct drm_connector *connector) > +{ > + struct drm_device *dev = connector->dev; > + struct drm_property *prop; > + > + prop = drm_property_create_enum(dev, DRM_

<    1   2   3