Re: [PATCH v3 06/12] drm/ttm: add TTM_PAGE_FLAG_EXTERNAL_MAPPABLE

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: In commit: commit 667a50db0477d47fdff01c666f5ee1ce26b5264c Author: Thomas Hellstrom Date: Fri Jan 3 11:17:18 2014 +0100 drm/ttm: Refuse to fault (prime-) imported pages we introduced the restriction that imported pages should not be directl

Re: [PATCH v3 05/12] drm/ttm: add some kernel-doc for TTM_PAGE_FLAG_*

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist, and get rid of all the strange holes. As suggested on the other patch I would do the rename and renumbering

Re: [PATCH v3 04/12] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. Suggested-by: Christian König Signed-off-by: M

Re: [RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-09-15 Thread Jeremy Cline
On Wed, 2021-09-15 at 17:01 +0300, Pekka Paalanen wrote: > On Fri, 30 Jul 2021 16:41:29 -0400 > Harry Wentland wrote: > > > Use the new DRM RFC doc section to capture the RFC previously only > > described in the cover letter at > > https://patchwork.freedesktop.org/series/89506/ > > > > v3: > >

Re: [PATCH v3 01/12] drm/ttm: stop setting page->index for the ttm_tt

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: In commit: commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 2014 +0100 drm/ttm: Correctly set page mapping and -index members we started setting the page->mapping and page->index to point to the

Re: [PATCH v3 03/12] drm/ttm: remove TTM_PAGE_FLAG_NO_RETRY

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: No longer used it seems. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König Reviewed-by: Christian König --- include/drm/ttm/ttm_tt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/

Re: [PATCH v3 02/12] drm/ttm: move ttm_tt_{add,clear}_mapping into amdgpu

2021-09-15 Thread Christian König
Am 15.09.21 um 20:59 schrieb Matthew Auld: Now that setting page->index shouldn't be needed anymore, we are just left with setting page->mapping, and here it looks like amdgpu is the only user, where pointing the page->mapping at the dev_mapping is used to verify that the pages do indeed belon

Re: [virtio-dev] Re: [PATCH v1 08/12] drm/virtio: implement context init: stop using drv->context when creating fence

2021-09-15 Thread Gerd Hoffmann
Hi, > > I guess you need to also update virtio_gpu_fence_event_process() > > then? It currently has the strict ordering logic baked in ... > > The update to virtio_gpu_fence_event_process was done as a preparation a > few months back: > > https://cgit.freedesktop.org/drm/drm-misc/commit/drive

Re: [PATCH] drm/exynos: Make use of the helper function devm_platform_ioremap_resource()

2021-09-15 Thread Inki Dae
21. 8. 31. 오후 4:49에 Cai Huoqing 이(가) 쓴 글: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > Picked it up. Thanks, Inki Dae > Signed-off-by: Cai Huoqing > --- > drivers/gpu/drm/exynos/exynos5433_drm_deco

Re: [PATCH 8/8] usb: typec: altmodes/displayport: Notify drm subsys of hotplug events

2021-09-15 Thread Stephen Boyd
Quoting Hans de Goede (2021-08-17 14:52:01) > diff --git a/drivers/usb/typec/altmodes/displayport.c > b/drivers/usb/typec/altmodes/displayport.c > index aa669b9cf70e..c1d8c23baa39 100644 > --- a/drivers/usb/typec/altmodes/displayport.c > +++ b/drivers/usb/typec/altmodes/displayport.c > @@ -125,6 +

Re: [PATCH v5 11/16] drm/mediatek: add display MDP RDMA support for MT8195

2021-09-15 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Thu, 2021-09-09 at 07:54 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年9月6日 週一 下午3:15寫道: > > > > Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of > > the ovl_adaptor component. > > > > Signed-off-by: Nancy.Lin > > --- > >

Re: [PATCH v5 08/16] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-09-15 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Wed, 2021-09-08 at 00:29 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年9月6日 週一 下午3:15寫道: > > > > Add cmdq support for mtk-mmsys config API. > > The mmsys config register settings need to take effect with the > > other > > HW settings(lik

Re: [PATCH v5 04/16] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-09-15 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Wed, 2021-09-08 at 00:06 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年9月6日 週一 下午3:15寫道: > > > > Add vdosys1 reset control bit for MT8195 platform. > > > > Signed-off-by: Nancy.Lin > > --- > > include/dt-bindings/reset/mt8195-resets.h

Re: [PATCH v5 01/16] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-09-15 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Tue, 2021-09-07 at 07:42 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年9月6日 週一 下午3:15寫道: > > > > Add vdosys1 RDMA definition. > > > > Signed-off-by: Nancy.Lin > > --- > > .../display/mediatek/mediatek,mdp-rdma.yaml | 77 > >

Re: [PATCH v5 09/16] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-09-15 Thread Nancy . Lin
Dear Philipp, Thanks for the review. On Mon, 2021-09-06 at 09:29 +0200, Philipp Zabel wrote: > Hi Nancy, > > On Mon, 2021-09-06 at 15:15 +0800, Nancy.Lin wrote: > > MT8195 vdosys1 has more than 32 reset bits and a different reset > > base > > than other chips. Modify mmsys for support 64 bit and

RE: [RFC v1 4/6] drm/virtio: Probe and implement VIRTIO_GPU_F_RELEASE_FENCE feature

2021-09-15 Thread Kasireddy, Vivek
Hi Gerd, > Hi, > > > --- a/include/uapi/linux/virtio_gpu.h > > +++ b/include/uapi/linux/virtio_gpu.h > > @@ -60,6 +60,8 @@ > > */ > > #define VIRTIO_GPU_F_RESOURCE_BLOB 3 > > > > +#define VIRTIO_GPU_F_RELEASE_FENCE 4 > > + > > enum virtio_gpu_ctrl_type { > > VIRTIO_GPU_UNDEFINED

Re: [Freedreno] [PATCH] drm/msm: Do not run snapshot on non-DPU devices

2021-09-15 Thread abhinavk
Hi Fabio On 2021-09-14 10:48, Fabio Estevam wrote: Since commit 98659487b845 ("drm/msm: add support to take dpu snapshot") the following NULL pointer dereference is seen on i.MX53: [ 3.275493] msm msm: bound 3000.gpu (ops a3xx_ops) [ 3.287174] [drm] Initialized msm 1.8.0 20130625 for msm on

Re: [virtio-dev] [PATCH v1 09/12] drm/virtio: implement context init: allocate an array of fence contexts

2021-09-15 Thread Chia-I Wu
i On Tue, Sep 14, 2021 at 6:26 PM Gurchetan Singh wrote: > > > > On Tue, Sep 14, 2021 at 10:53 AM Chia-I Wu wrote: >> >> ,On Mon, Sep 13, 2021 at 6:57 PM Gurchetan Singh >> wrote: >> > >> > >> > >> > >> > On Mon, Sep 13, 2021 at 11:52 AM Chia-I Wu wrote: >> >> >> >> . >> >> >> >> On Mon, Sep

[PATCH 2/2] drm/i915/uapi: Add query for hwconfig table

2021-09-15 Thread John . C . Harrison
From: Rodrigo Vivi GuC contains a consolidated table with a bunch of information about the current device. Previously, this information was spread and hardcoded to all the components including GuC, i915 and various UMDs. The goal here is to consolidate the data into GuC in a way that all interes

[PATCH 0/2] Add support for querying hw info that UMDs need

2021-09-15 Thread John . C . Harrison
From: John Harrison Various UMDs require hardware configuration information about the current platform. A bunch of static information is available in a fixed table that can be retrieved from the GuC. Test-with: 20210915215558.2473428-2-john.c.harri...@intel.com UMD: https://github.com/intel/comp

[PATCH 1/2] drm/i915/guc: Add fetch of hwconfig table

2021-09-15 Thread John . C . Harrison
From: John Harrison Implement support for fetching the hardware description table from the GuC. The call is made twice - once without a destination buffer to query the size and then a second time to fill in the buffer. Note that the table is only available on ADL-P and later platforms. Cc: Mich

Re: [virtio-dev] Re: [PATCH v1 08/12] drm/virtio: implement context init: stop using drv->context when creating fence

2021-09-15 Thread Gurchetan Singh
On Tue, Sep 14, 2021 at 10:53 PM Gerd Hoffmann wrote: > On Wed, Sep 08, 2021 at 06:37:13PM -0700, Gurchetan Singh wrote: > > The plumbing is all here to do this. Since we always use the > > default fence context when allocating a fence, this makes no > > functional difference. > > > > We can't p

Re: [PATCH v2] drm/panfrost: Calculate lock region size correctly

2021-09-15 Thread Alyssa Rosenzweig
Took me a careful read, but this is Reviewed-by: Alyssa Rosenzweig Thanks for hunting this down!

Re: [PATCH V6 2/2] drm/vkms: Add support for virtual hardware mode

2021-09-15 Thread Melissa Wen
On 09/01, Sumera Priyadarsini wrote: > Add a virtual hardware or vblank-less mode as a module > to enable VKMS to emulate virtual hardware drivers. This means > no vertical blanking events occur and pageflips are completed > arbitrarily and when required for updating the frame. > > Add a new drm_c

[PATCH v7 2/3] drm/mediatek: implment the dsi hs packets aligned

2021-09-15 Thread Jitao Shi
Some dsi devices require the packets on lanes aligned at the end, or the screen will shift or scroll. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk

[PATCH v7 3/3] drm/bridge: anx7625: config hs packets end aligned to avoid screen shift

2021-09-15 Thread Jitao Shi
This device requires the packets on lanes aligned at the end to fix screen shift or scroll. Signed-off-by: Jitao Shi --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7

[PATCH v7 1/3] drm/dsi: transer dsi hs packet aligned

2021-09-15 Thread Jitao Shi
Some DSI devices reqire the hs packet starting and ending at same time on all dsi lanes. So use a flag to those devices. Signed-off-by: Jitao Shi --- include/drm/drm_mipi_dsi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index af7

[PATCH v7 0/3] force hsa hbp hfp packets multiple of lanenum to avoid screen shift

2021-09-15 Thread Jitao Shi
Changes since v6: - Add "bool hs_packet_end_aligned" in "struct mipi_dsi_device" to control the dsi aligned. - Config the "hs_packet_end_aligned" in ANX7725 .attach(). Changes since v5: - Search the anx7625 compatible as flag to control dsi output aligned. Changes since v4: - Move "dt-bindin

Re: [RFC PATCH v2 2/2] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-15 Thread Doug Anderson
Hi, On Tue, Sep 14, 2021 at 5:28 PM Philip Chen wrote: > > > > Changes in v2: > > > - Handle the case where an AUX transaction has no payload > > > - Add a reg polling for p0.0x83 to confirm AUX cmd is issued and > > > read data is returned > > > - Replace regmap_noinc_read/write with looped re

Re: [PATCH v3 3/3] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-15 Thread Doug Anderson
Hi, On Tue, Sep 14, 2021 at 5:57 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-09-14 16:28:45) > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c > > b/drivers/gpu/drm/bridge/parade-ps8640.c > > index 8d3e7a147170..dc349d729f5a 100644 > > --- a/drivers/gpu/drm/bridge/parade-ps8640.c

Re: [PATCH v3 3/3] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-15 Thread Philip Chen
Hi Fabio On Wed, Sep 15, 2021 at 2:00 PM Fabio Estevam wrote: > > On Wed, Sep 15, 2021 at 5:41 PM Philip Chen wrote: > > > As regmap_read() should always read 1 byte at a time, should I just do: > > regmap_read(map, PAGE0_SWAUX_RDATA, (unsigned int*)(buf + i)) > > There is also regmap_bulk_read(

Re: [PATCH 0/9] drm: Add privacy-screen class and connector properties

2021-09-15 Thread Lyude Paul
OK! Looked over all of these patches. Patches 2 and 4 have some comments that should be addressed, but otherwise this series is: Reviewed-by: Lyude Paul Let me know when/if you need help pushing this upstream On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > Hi all, > > Here is the pri

Re: [PATCH 9/9] drm/i915: Add privacy-screen support

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > Add support for eDP panels with a built-in privacy screen using the > new drm_privacy_screen class. > > One thing which stands out here is the addition of these 2 lines to > intel_atomic_commit_tail: > > for_each_new_connector_in_s

[Bug 214425] New: [drm][amdgpu][TTM] Page pool memory never gets freed

2021-09-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214425 Bug ID: 214425 Summary: [drm][amdgpu][TTM] Page pool memory never gets freed Product: Drivers Version: 2.5 Kernel Version: 5.14.3 Hardware: x86-64 OS: Linux T

Re: [Intel-gfx] [PATCH v9 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-09-15 Thread Rodrigo Vivi
On Wed, Sep 15, 2021 at 04:53:35PM +0300, Jani Nikula wrote: > On Fri, 10 Sep 2021, Daniele Ceraolo Spurio > wrote: > > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h > > b/drivers/gpu/drm/i915/pxp/intel_pxp.h > > new file mode 100644 > > index ..e87550fb9821 > > --- /dev/null > >

Re: [PATCH v3 3/3] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-15 Thread Fabio Estevam
On Wed, Sep 15, 2021 at 5:41 PM Philip Chen wrote: > As regmap_read() should always read 1 byte at a time, should I just do: > regmap_read(map, PAGE0_SWAUX_RDATA, (unsigned int*)(buf + i)) There is also regmap_bulk_read() if you need to read more data.

Re: [Intel-gfx] [PATCH 14/27] drm/i915/guc: Assign contexts in parent-child relationship consecutive guc_ids

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 01:04:45PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > Assign contexts in parent-child relationship consecutive guc_ids. This > > is accomplished by partitioning guc_id space between ones that need to > > be consecutive (1/16 available guc_ids)

Re: [PATCH 8/9] platform/x86: thinkpad_acpi: Register a privacy-screen device

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > Register a privacy-screen device on laptops with a privacy-screen, > this exports the PrivacyGuard features to user-space using a > standardized vendor-agnostic sysfs interface. Note the sysfs interface > is read-only. > > Registering a pri

[PATCH] drm/rockchip: remove unused psr_list{,_lock}

2021-09-15 Thread Brian Norris
Some leftover cleanup from commit 6c836d965bad ("drm/rockchip: Use the helpers for PSR"). Cc: Heiko Stuebner Cc: Sean Paul Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 --- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 -- 2 files changed, 5 deletions(-)

Re: [PATCH v3 3/3] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-15 Thread Philip Chen
Hi On Tue, Sep 14, 2021 at 5:57 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-09-14 16:28:45) > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c > > b/drivers/gpu/drm/bridge/parade-ps8640.c > > index 8d3e7a147170..dc349d729f5a 100644 > > --- a/drivers/gpu/drm/bridge/parade-ps8640.c >

[PATCH v2 13/13] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers

2021-09-15 Thread Sean Paul
From: Sean Paul This patch adds HDCP 1.x support to msm DP connectors using the new HDCP helpers. Cc: Stephen Boyd Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-15-s...@poorly.run #v1 Changes in v2: -Squash [1] into this patch with the fol

[PATCH v2 12/13] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-09-15 Thread Sean Paul
From: Sean Paul This patch adds the bindings for the MSM DisplayPort HDCP registers which are required to write the HDCP key into the display controller as well as the registers to enable HDCP authentication/key exchange/encryption. Cc: Rob Herring Cc: Stephen Boyd Signed-off-by: Sean Paul Li

[PATCH v2 11/13] drm/msm/dp: Re-order dp_audio_put in deinit_sub_modules

2021-09-15 Thread Sean Paul
From: Sean Paul Audio is initialized last, it should be de-initialized first to match the order in dp_init_sub_modules(). Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-12-s...@poorly.run #v1 Changes in v2: -None --- drivers/gpu/drm/msm/dp/

[PATCH v2 10/13] drm/msm/dpu: Remove encoder->enable() hack

2021-09-15 Thread Sean Paul
From: Sean Paul encoder->commit() was being misused because there were some global resources which needed to be tweaked in encoder->enable() which were not accessible in dpu_encoder.c. That is no longer true and the redirect serves no purpose any longer. So remove the indirection. Signed-off-by:

[PATCH v2 09/13] drm/msm/dpu: Remove useless checks in dpu_encoder

2021-09-15 Thread Sean Paul
From: Sean Paul A couple more useless checks to remove in dpu_encoder. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-10-s...@poorly.run #v1 Changes in v2: -None --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 1 file chan

[PATCH v2 08/13] drm/msm/dpu_kms: Re-order dpu includes

2021-09-15 Thread Sean Paul
From: Sean Paul Make includes alphabetical in dpu_kms.c Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-9-s...@poorly.run #v1 Changes in v2: -None --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 1 file changed, 4 insertions(+), 4 d

[PATCH v2 07/13] drm/i915/hdcp: Use HDCP helpers for i915

2021-09-15 Thread Sean Paul
From: Sean Paul Now that all of the HDCP 1.x logic has been migrated to the central HDCP helpers, use it in the i915 driver. The majority of the driver code for HDCP 1.x will live in intel_hdcp.c, however there are a few helper hooks which are connector-specific and need to be partially or fully

[PATCH v2 06/13] drm/i915/hdcp: Retain hdcp_capable return codes

2021-09-15 Thread Sean Paul
From: Sean Paul The shim functions return error codes, but they are discarded in intel_hdcp.c. This patch plumbs the return codes through so they are properly handled. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-7-s...@poorly.run #v1 Chan

[PATCH v2 05/13] drm/i915/hdcp: Consolidate HDCP setup/state cache

2021-09-15 Thread Sean Paul
From: Sean Paul Stick all of the setup for HDCP into a dedicated function. No functional change, but this will facilitate moving HDCP logic into helpers. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-6-s...@poorly.run #v1 Changes in v2: -No

[PATCH v2 04/13] drm/hdcp: Expand HDCP helper library for enable/disable/check

2021-09-15 Thread Sean Paul
From: Sean Paul This patch expands upon the HDCP helper library to manage HDCP enable, disable, and check. Previous to this patch, the majority of the state management and sink interaction is tucked inside the Intel driver with the understanding that once a new platform supported HDCP we could m

[PATCH v2 03/13] drm/hdcp: Update property value on content type and user changes

2021-09-15 Thread Sean Paul
From: Sean Paul This patch updates the connector's property value in 2 cases which were previously missed: 1- Content type changes. The value should revert back to DESIRED from ENABLED in case the driver must re-authenticate the link due to the new content type. 2- Userspace sets value to

[PATCH v2 02/13] drm/hdcp: Avoid changing crtc state in hdcp atomic check

2021-09-15 Thread Sean Paul
From: Sean Paul Instead of forcing a modeset in the hdcp atomic check, simply return true if the content protection value is changing and let the driver decide whether a modeset is required or not. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.4745

[PATCH v2 01/13] drm/hdcp: Add drm_hdcp_atomic_check()

2021-09-15 Thread Sean Paul
From: Sean Paul This patch moves the hdcp atomic check from i915 to drm_hdcp so other drivers can use it. No functional changes, just cleaned up some of the code when moving it over. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-2-s...@poorly

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 01:23:19PM -0700, John Harrison wrote: > On 9/15/2021 12:31, Matthew Brost wrote: > > On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: > > > On 8/20/2021 15:44, Matthew Brost wrote: > > > > Add multi-lrc context registration H2G. In addition a workqueue and > >

[PATCH v2 00/13] drm/hdcp: Pull HDCP auth/exchange/check into helpers

2021-09-15 Thread Sean Paul
From: Sean Paul Hello again, This is the second version of the HDCP helper patchset. See version 1 here: https://patchwork.freedesktop.org/series/94623/ In this second version, I've fixed up the oopsies exposed by 0-day and yamllint and incorporated early review feedback from the dt/dts reviews.

Re: [PATCH 4/9] drm/privacy-screen: Add notifier support

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > Add support for privacy-screen consumers to register a notifier to > be notified of external (e.g. done by the hw itself on a hotkey press) > state changes. > > Reviewed-by: Emil Velikov > Signed-off-by: Hans de Goede > --- >  drivers/gpu

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread John Harrison
On 9/15/2021 12:31, Matthew Brost wrote: On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: On 8/20/2021 15:44, Matthew Brost wrote: Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data s

Re: [Intel-gfx] [PATCH 14/27] drm/i915/guc: Assign contexts in parent-child relationship consecutive guc_ids

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Assign contexts in parent-child relationship consecutive guc_ids. This is accomplished by partitioning guc_id space between ones that need to be consecutive (1/16 available guc_ids) and ones that do not (15/16 of available guc_ids). The consecutive search

Re: [PATCH 2/9] drm: Add privacy-screen class (v3)

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > On some new laptops the LCD panel has a builtin electronic privacy-screen. > We want to export this functionality as a property on the drm connector > object. But often this functionality is not exposed on the GPU but on some > other (ACPI)

Re: [PATCH 1/9] drm/connector: Add support for privacy-screen properties (v4)

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > From: Rajat Jain > > Add support for generic electronic privacy screen properties, that > can be added by systems that have an integrated EPS. > > Changes in v2 (Hans de Goede) > - Create 2 properties, "privacy-screen sw-state" and >   "p

Re: [Intel-gfx] [PATCH 13/27] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 12:24:41PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > In GuC parent-child contexts the parent context controls the scheduling, > > ensure only the parent does the scheduling operations. > > > > Signed-off-by: Matthew Brost > > --- > > .../

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > Add multi-lrc context registration H2G. In addition a workqueue and > > process descriptor are setup during multi-lrc context registration as > > these data structures are needed for multi-

[PATCH] drm/i915: zero fill vma name buffer

2021-09-15 Thread Tim Gardner
In capture_vma() Coverity complains of a possible buffer overrun. Even though this is a static function where all call sites can be checked, limiting the copy length could save some future grief. CID 93300 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) 4. fixed_size_dest: You might overr

Re: [PATCH] drm/i915/guc/slpc: remove unneeded clflush calls

2021-09-15 Thread John Harrison
On 9/15/2021 12:24, Belgaumkar, Vinay wrote: On 9/14/2021 12:51 PM, Lucas De Marchi wrote: The clflush calls here aren't doing anything since we are not writting something and flushing the cache lines to be visible to GuC. Here the intention seems to be to make sure whatever GuC has written is v

Re: [Intel-gfx] [PATCH 13/27] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: In GuC parent-child contexts the parent context controls the scheduling, ensure only the parent does the scheduling operations. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 24 ++- 1 file changed, 18

Re: [PATCH] drm/i915/guc/slpc: remove unneeded clflush calls

2021-09-15 Thread Belgaumkar, Vinay
On 9/14/2021 12:51 PM, Lucas De Marchi wrote: The clflush calls here aren't doing anything since we are not writting something and flushing the cache lines to be visible to GuC. Here the intention seems to be to make sure whatever GuC has written is visible to the CPU before we read them. Howe

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data structures are needed for multi-lrc submission. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/g

[PATCH v3 12/12] drm/i915/ttm: enable shmem tt backend

2021-09-15 Thread Matthew Auld
Enable shmem tt backend, and enable shrinking. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index e758de336b96..

[PATCH v3 11/12] drm/i915/ttm: make evicted shmem pages visible to the shrinker

2021-09-15 Thread Matthew Auld
We currently just evict lmem objects to system memory when under memory pressure. For this case we lack the usual object mm.pages, which effectively hides the pages from the i915-gem shrinker, until we actually "attach" the TT to the object, or in the case of lmem-only objects it just gets migrated

[PATCH v3 08/12] drm/i915/ttm: add tt shmem backend

2021-09-15 Thread Matthew Auld
For cached objects we can allocate our pages directly in shmem. This should make it possible(in a later patch) to utilise the existing i915-gem shrinker code for such objects. For now this is still disabled. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- drivers/gpu/d

[PATCH v3 10/12] drm/i915: try to simplify make_{un}shrinkable

2021-09-15 Thread Matthew Auld
Drop the atomic shrink_pin stuff, and just have make_{un}shrinkable update the shrinker visible lists immediately. This at least simplifies the next patch, and does make the behaviour more obvious. The potential downside is that make_unshrinkable now grabs a global lock even when the object itself

[PATCH v3 06/12] drm/ttm: add TTM_PAGE_FLAG_EXTERNAL_MAPPABLE

2021-09-15 Thread Matthew Auld
In commit: commit 667a50db0477d47fdff01c666f5ee1ce26b5264c Author: Thomas Hellstrom Date: Fri Jan 3 11:17:18 2014 +0100 drm/ttm: Refuse to fault (prime-) imported pages we introduced the restriction that imported pages should not be directly mappable through TTM(this also extends to userp

[PATCH v3 09/12] drm/i915/ttm: use cached system pages when evicting lmem

2021-09-15 Thread Matthew Auld
This should let us do an accelerated copy directly to the shmem pages when temporarily moving lmem-only objects, where the i915-gem shrinker can later kick in to swap out the pages, if needed. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 -

[PATCH v3 07/12] drm/i915/gem: Break out some shmem backend utils

2021-09-15 Thread Matthew Auld
From: Thomas Hellström Break out some shmem backend utils for future reuse by the TTM backend: shmem_alloc_st(), shmem_free_st() and __shmem_writeback() which we can use to provide a shmem-backed TTM page pool for cached-only TTM buffer objects. Main functional change here is that we now compute

[PATCH v3 05/12] drm/ttm: add some kernel-doc for TTM_PAGE_FLAG_*

2021-09-15 Thread Matthew Auld
Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist, and get rid of all the strange holes. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- include/drm/ttm/ttm_tt.h | 57

[PATCH v3 04/12] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-15 Thread Matthew Auld
It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. Suggested-by: Christian König Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian

[PATCH v3 03/12] drm/ttm: remove TTM_PAGE_FLAG_NO_RETRY

2021-09-15 Thread Matthew Auld
No longer used it seems. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- include/drm/ttm/ttm_tt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 89b15d673b22..842ce756213c 100644 --- a/include/drm/ttm/ttm_tt

[PATCH v3 02/12] drm/ttm: move ttm_tt_{add, clear}_mapping into amdgpu

2021-09-15 Thread Matthew Auld
Now that setting page->index shouldn't be needed anymore, we are just left with setting page->mapping, and here it looks like amdgpu is the only user, where pointing the page->mapping at the dev_mapping is used to verify that the pages do indeed belong to the device, if userspace later tries to tou

[PATCH v3 01/12] drm/ttm: stop setting page->index for the ttm_tt

2021-09-15 Thread Matthew Auld
In commit: commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 2014 +0100 drm/ttm: Correctly set page mapping and -index members we started setting the page->mapping and page->index to point to the virtual address space, if the pages were faul

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 07:18:34PM +0200, Christophe Leroy wrote: > Could you please provide more explicit explanation why inlining such an > helper is considered as bad practice and messy ? Tom already told you to look at the previous threads. Let's read them together. This one, for example: htt

Re: [PATCH 1/2] drm/sched: fix the bug of time out calculation(v4)

2021-09-15 Thread Andrey Grodzovsky
Pushed Andrey On 2021-09-15 7:45 a.m., Christian König wrote: Yes, I think so as well. Andrey can you push this? Christian. Am 15.09.21 um 00:59 schrieb Grodzovsky, Andrey: AFAIK this one is independent. Christian, can you confirm ? Andrey --

[PATCH v2] drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup

2021-09-15 Thread Jernej Skrabec
Recent rework, which made HDMI PHY driver a platform device, inadvertely reversed clock setup order. HW is very touchy about it. Proper way is to handle controllers resets and clocks first and HDMI PHYs second. Currently, without this fix, first mode set completely fails (nothing on HDMI monitor)

Re: [PATCH v2] drm/v3d: fix wait for TMU write combiner flush

2021-09-15 Thread Melissa Wen
On 09/15, Iago Toral Quiroga wrote: > The hardware sets the TMUWCF bit back to 0 when the TMU write > combiner flush completes so we should be checking for that instead > of the L2TFLS bit. > > v2 (Melissa Wen): > - Add Signed-off-by and Fixes tags. > - Change the error message for the timeout

[PATCH RESEND v2 3/3] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-15 Thread Imran Khan
To print stack entries into a buffer, users of stackdepot, first get a list of stack entries using stack_depot_fetch and then print this list into a buffer using stack_trace_snprint. Provide a helper in stackdepot for this purpose. Also change above mentioned users to use this helper. Signed-off-b

[PATCH RESEND v2 2/3] lib, stackdepot: Add helper to print stack entries.

2021-09-15 Thread Imran Khan
To print a stack entries, users of stackdepot, first use stack_depot_fetch to get a list of stack entries and then use stack_trace_print to print this list. Provide a helper in stackdepot to print stack entries based on stackdepot handle. Also change above mentioned users to use this helper. Signe

[PATCH RESEND v2 1/3] lib, stackdepot: check stackdepot handle before accessing slabs.

2021-09-15 Thread Imran Khan
stack_depot_save allocates slabs that will be used for storing objects in future.If this slab allocation fails we may get to a situation where space allocation for a new stack_record fails, causing stack_depot_save to return 0 as handle. If user of this handle ends up invoking stack_depot_fetch wit

[PATCH RESEND v2 0/3] lib, stackdepot: check stackdepot handle before accessing slabs

2021-09-15 Thread Imran Khan
Changes in v2: - Fixed compilation error [1] due to typo in patch-3 (stack_depot_print used in place of stack_depot_snprint) This compilation error appears with CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y and this was missed by my test config (x86_64_defconfig) [1] https://patchwork.freedesktop.o

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Kuppuswamy, Sathyanarayanan
On 9/15/21 9:46 AM, Borislav Petkov wrote: Sathya, if you want to prepare the Intel variant intel_cc_platform_has() ontop of those and send it to me, that would be good because then I can integrate it all in one branch which can be used to base future work ontop. I have a Intel variant patc

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Christophe Leroy
Le 15/09/2021 à 12:08, Borislav Petkov a écrit : On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: I don't love it, a new C file and an out-of-line call to then call back to a static inline that for most configuration will return false ... but whatever :) Yeah, hch thinks it

Re: [Intel-gfx] [PATCH 08/27] drm/i915: Add logical engine mapping

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 09:24:15AM +0100, Tvrtko Ursulin wrote: > > On 14/09/2021 19:04, Matthew Brost wrote: > > On Tue, Sep 14, 2021 at 09:34:08AM +0100, Tvrtko Ursulin wrote: > > > > > 8< > > > > Today we have: > > > > > > for_each intel_engines: // intel_engines is a flat list of all engin

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:31PM -0500, Tom Lendacky wrote: > This patch series provides a generic helper function, cc_platform_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new confidential computing technolo

Re: [PATCH v3 2/3] drm/bridge: parade-ps8640: Use regmap APIs

2021-09-15 Thread Doug Anderson
Hi, On Tue, Sep 14, 2021 at 7:50 PM Stephen Boyd wrote: > > Quoting Doug Anderson (2021-09-14 19:17:03) > > Hi, > > > > On Tue, Sep 14, 2021 at 5:29 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-09-14 16:28:44) > > > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c > > > > b

[PATCH v8 16/16] nouveau: fold multiple DRM_DEBUG_DRIVERs together

2021-09-15 Thread Jim Cromie
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes. We can combine 12 into one here and save ~620 bytes. Signed-off-by: Jim Cromie --- drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +-- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/g

[PATCH v8 15/16] amdgpu_ucode: reduce number of pr_debug calls

2021-09-15 Thread Jim Cromie
There are blocks of DRM_DEBUG calls, consolidate their args into single calls. With dynamic-debug in use, each callsite consumes 56 bytes of callsite data, and this patch removes about 65 calls, so it saves ~3.5kb. no functional changes. RFC: this creates multi-line log messages, does that break

[PATCH v8 14/16] drm_print: instrument drm_debug_enabled

2021-09-15 Thread Jim Cromie
Duplicate drm_debug_enabled() code into both "basic" and "dyndbg" ifdef branches. Then add a pr_debug("todo: ...") into the "dyndbg" branch. Then convert the "dyndbg" branch's code to a macro, so that the pr_debug() get its callsite info from the invoking function, instead of from drm_debug_enabl

[PATCH v8 13/16] drm_print: add choice to use dynamic debug in drm-debug

2021-09-15 Thread Jim Cromie
drm's debug system writes 10 distinct categories of messages to syslog using a small API[1]: drm_dbg*(10 names), DRM_DEV_DEBUG*(3 names), DRM_DEBUG*(8 names). There are thousands of these callsites, each categorized in this systematized way. These callsites can be enabled at runtime by their cate

[PATCH v8 12/16] amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES on existing prdbgs

2021-09-15 Thread Jim Cromie
logger_types.h defines many DC_LOG_*() categorized debug wrappers. Most of these already use DRM debug API, so are controllable using drm.debug, but others use a bare pr_debug("$prefix: .."), with 1 of 13 different class-prefixes matching ~/^\[[_A-Z]+\]:/ Use DEFINE_DYNAMIC_DEBUG_CATEGORIES to cre

[PATCH v8 11/16] i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES for existing prdbgs

2021-09-15 Thread Jim Cromie
The gvt component of this driver has ~120 pr_debugs, in 9 categories quite similar to those in DRM. Following the interface model of drm.debug, add a parameter to map bits to these categorizations. DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_gvt, __gvt_debug, "dyndbg bitmap desc", _DD_c

[PATCH v8 09/16] drm: fix doc grammar error

2021-09-15 Thread Jim Cromie
no code changes, good for rc Signed-off-by: Jim Cromie --- include/drm/drm_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index b439ae1921b8..ebb22166ace1 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -5

[PATCH v8 10/16] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-09-15 Thread Jim Cromie
Taking embedded spaces out of existing prefixes makes them better class-prefixes; simplifying the extra quoting needed otherwise: $> echo format "^gvt: core:" +p >control Dropping the internal spaces means any trailing space in a query will more clearly terminate the prefix being searched for.

  1   2   >