[Freedreno] [PATCH v2 02/21] drm/mcde: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as mcde uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/

[Freedreno] [PATCH v2 01/21] drm/komeda: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as komeda uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann --- drivers/gp

[Freedreno] [PATCH v2 00/21] drm/fb-helper: Untangle fbdev emulation and helpers

2022-10-24 Thread Thomas Zimmermann
Separate generic fbdev emulation from the helper code that is shared among the various fbdev implementations within DRM. Affects many drivers. It has become apparent that our fully generic fbdev emulation will never produce optimal results for all drivers. In its current form, it is also hard to m

[Freedreno] [PATCH v2 04/21] drm/amdgpu: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as amdgpu uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_

[Freedreno] [PATCH v2 09/21] drm/panel-ili9341: Include

2022-10-24 Thread Thomas Zimmermann
Include for devm_of_find_backlight(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c index 39dc40cf681f0..b59472c29

[Freedreno] [PATCH v2 08/21] drm/rockchip: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as rockchip uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in dr

[Freedreno] [PATCH v2 07/21] drm/logicvc: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as logicvc uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm

[Freedreno] [PATCH v2 13/21] drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix

2022-10-24 Thread Thomas Zimmermann
Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c| 8 ---

[Freedreno] [PATCH v2 06/21] drm/ingenic: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as ingenic uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm

[Freedreno] [PATCH v2 14/21] drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix

2022-10-24 Thread Thomas Zimmermann
Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c|

[Freedreno] [PATCH v2 05/21] drm/imx/dcss: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as DCSS uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_pr

[Freedreno] [PATCH v2 16/21] drm/fb-helper: Call fb_sync in I/O functions

2022-10-24 Thread Thomas Zimmermann
Call struct fb_ops.fb_sync in drm_fbdev_{read,write}() to mimic the behavior of fbdev. Fbdev implementations of fb_read and fb_write in struct fb_ops invoke fb_sync to synchronize with outstanding operations before I/O. Doing the same in DRM implementations will allow us to use them throughout DRM

[Freedreno] [PATCH v2 21/21] drm/fb-helper: Remove unnecessary include statements

2022-10-24 Thread Thomas Zimmermann
Remove include statements for where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

[Freedreno] [PATCH v2 10/21] drm/tve200: Include

2022-10-24 Thread Thomas Zimmermann
Include for of_match_ptr(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tve200/tve200_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 04db72e3fa9c2..611785e097576 100644 --- a/drivers/gpu/drm/tve

[Freedreno] [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-10-24 Thread Thomas Zimmermann
Implement the fbdev's read/write helpers with the same functions. Use the generic fbdev's code as template. Convert all drivers. DRM's fb helpers must implement regular I/O functionality in struct fb_ops and possibly perform a damage update. Handle all this in the same functions and convert driver

[Freedreno] [PATCH v2 03/21] drm/vboxvideo: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as vboxvideo uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann --- drivers

[Freedreno] [PATCH v2 15/21] drm/fb-helper: Disconnect damage worker from update logic

2022-10-24 Thread Thomas Zimmermann
The fbdev helpers implement a damage worker that forwards fbdev updates to the DRM driver. The worker's update logic depends on the generic fbdev emulation. Separate the two via function pointer. The generic fbdev emulation sets struct drm_fb_helper_funcs.fb_dirty, a new callback that hides the up

[Freedreno] [PATCH v2 18/21] drm/fb_helper: Minimize damage-helper overhead

2022-10-24 Thread Thomas Zimmermann
Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann --- dr

[Freedreno] [PATCH v2 12/21] drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper

2022-10-24 Thread Thomas Zimmermann
Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c

[Freedreno] [PATCH v2 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-10-24 Thread Thomas Zimmermann
Move the generic fbdev implementation into its own source and header file. Adapt drivers. No functonal changes, but some of the internal helpers have been renamed to fit into the drm_fbdev_ naming scheme. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 2 +-

[Freedreno] [PATCH v2 11/21] drm/fb-helper: Cleanup include statements in header file

2022-10-24 Thread Thomas Zimmermann
Only include what we have to. Signed-off-by: Thomas Zimmermann --- include/drm/drm_fb_helper.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index fddd0d1af6891..e923089522896 100644 --- a/include/drm/drm_fb_he

[Freedreno] [PATCH v2 19/21] drm/fb-helper: Always initialize generic fbdev emulation

2022-10-24 Thread Thomas Zimmermann
Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas

Re: [Freedreno] [PATCH v2 00/10] drm/msm: probe deferral fixes

2022-10-24 Thread Johan Hovold
On Fri, Oct 21, 2022 at 09:05:52AM -0700, Abhinav Kumar wrote: > Hi Johan > > On 10/20/2022 11:27 PM, Johan Hovold wrote: > > On Tue, Sep 20, 2022 at 11:06:30AM +0200, Johan Hovold wrote: > >> On Tue, Sep 13, 2022 at 10:53:10AM +0200, Johan Hovold wrote: > >>> The MSM DRM driver is currently broke

Re: [Freedreno] [PATCH v2 00/10] drm/msm: probe deferral fixes

2022-10-24 Thread Rob Clark
On Mon, Oct 24, 2022 at 4:34 AM Johan Hovold wrote: > > On Fri, Oct 21, 2022 at 09:05:52AM -0700, Abhinav Kumar wrote: > > Hi Johan > > > > On 10/20/2022 11:27 PM, Johan Hovold wrote: > > > On Tue, Sep 20, 2022 at 11:06:30AM +0200, Johan Hovold wrote: > > >> On Tue, Sep 13, 2022 at 10:53:10AM +020

[Freedreno] [PATCH v2 1/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-10-24 Thread Dmitry Baryshkov
The function a6xx_create_address_space() is mostly a copy of adreno_iommu_create_address_space() with added quirk setting. Reuse the original function to do the work, while introducing the wrapper to set the quirk. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 31

[Freedreno] [PATCH v2 2/2] drm/msm: move domain allocation into msm_iommu_new()

2022-10-24 Thread Dmitry Baryshkov
After the msm_iommu instance is created, the IOMMU domain is completely handled inside the msm_iommu code. Move the iommu_domain_alloc() call into the msm_iommu_new() to simplify callers code. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov --- Changes since v1: - Fixed the unini

Re: [Freedreno] [PATCH v8 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc

2022-10-24 Thread Dmitry Baryshkov
On 12/10/2022 15:02, Vinod Polimera wrote: Update crtc retrieval from dpu_enc to dpu_enc connector state, since new links get set as part of the dpu enc virt mode set. The dpu_enc->crtc cache is no more needed, hence cleaning it as part of this change. Signed-off-by: Vinod Polimera --- driver

[Freedreno] [PATCH v3] drm/msm/mdp5: stop overriding drvdata

2022-10-24 Thread Dmitry Baryshkov
The rest of the code expects that master's device drvdata is the struct msm_drm_private instance. Do not override the mdp5's drvdata. Fixes: 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components") Signed-off-by: Dmitry Baryshkov --- Abhinav, Rob, please pick this for -fixes. This is an

[Freedreno] [PATCH v2 0/7] drm/bridge_connector: perform HPD enablement automatically

2022-10-24 Thread Dmitry Baryshkov
>From all the drivers using drm_bridge_connector only iMX/dcss and OMAP DRM driver do a proper work of calling drm_bridge_connector_en/disable_hpd() in right places. Rather than teaching each and every driver how to properly handle drm_bridge_connector's HPD, make that automatic. Add two additiona

[Freedreno] [PATCH v2 2/7] drm/probe-helper: enable and disable HPD on connectors

2022-10-24 Thread Dmitry Baryshkov
Intruct two drm_connector_helper_funcs: enable_hpd() and disable_hpd(). They are called by drm_kms_helper_poll_enable() and drm_kms_helper_poll_disable() (and thus drm_kms_helper_poll_init() and drm_kms_helper_poll_fini()) respectively. This allows drivers to rely on drm_kms_helper_poll for enabli

[Freedreno] [PATCH v2 4/7] drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()

2022-10-24 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 drivers/gpu/drm/imx/dcss/d

[Freedreno] [PATCH v2 1/7] drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()

2022-10-24 Thread Dmitry Baryshkov
Merge drm_kms_helper_poll_disable() and drm_kms_helper_poll_fini() code into a common helper function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_probe_helper.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helpe

[Freedreno] [PATCH v2 5/7] drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()

2022-10-24 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- 1 file changed, 2 deletions(-)

[Freedreno] [PATCH v2 3/7] drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement

2022-10-24 Thread Dmitry Baryshkov
Use drm_connector's helpers enable_hpd and disable_hpd to enable and disable HPD automatically by the means of drm_kms_helper_poll_* functions. As the drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() functions are now unused, replace them with stubs to ease driver migration.

[Freedreno] [PATCH v2 6/7] drm/omap: stop using drm_bridge_connector_en/disable_hpd()

2022-10-24 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/omapdrm/omap_drv.c | 41 --

[Freedreno] [PATCH v2 7/7] drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

2022-10-24 Thread Dmitry Baryshkov
Now as all drivers stopped calling drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() it is safe to remove them complelely. Rename our internal helpers to remove the underscore prefix. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 33 -

Re: [Freedreno] [PATCH v2 1/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-10-24 Thread Rob Clark
On Mon, Oct 24, 2022 at 8:14 AM Dmitry Baryshkov wrote: > > The function a6xx_create_address_space() is mostly a copy of > adreno_iommu_create_address_space() with added quirk setting. Reuse the > original function to do the work, while introducing the wrapper to set > the quirk. > > Signed-off-by

[Freedreno] [PATCH v9 00/12] dt-bindings: display/msm: rework MDSS and DPU bindings

2022-10-24 Thread Dmitry Baryshkov
Create separate YAML schema for MDSS devicesd$ (both for MDP5 and DPU devices). Cleanup DPU schema files, so that they do not contain schema for both MDSS and DPU nodes. Apply misc small fixes to the DPU schema afterwards. Add schema for the MDSS and DPU on sm8250 platform. Soft dependency on [1]

[Freedreno] [PATCH v9 01/12] dt-bindings: display/msm: split qcom, mdss bindings

2022-10-24 Thread Dmitry Baryshkov
Split Mobile Display SubSystem (MDSS) root node bindings to the separate yaml file. Changes to the existing (txt) schema: - Added optional "vbif_nrt_phys" region used by msm8996 - Made "bus" and "vsync" clocks optional (they are not used by some platforms) - Added optional resets property ref

[Freedreno] [PATCH v9 02/12] dt-bindings: display/msm: add gcc-bus clock to dpu-smd845

2022-10-24 Thread Dmitry Baryshkov
Add gcc-bus clock required for the SDM845 DPU device tree node. This change was made in the commit 111c52854102 ("arm64: dts: qcom: sdm845: move bus clock to mdp node for sdm845 target"), but was not reflected in the schema. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../devic

[Freedreno] [PATCH v9 03/12] dt-bindings: display/msm: add interconnects property to qcom, mdss-smd845

2022-10-24 Thread Dmitry Baryshkov
Add interconnects required for the SDM845 MDSS device tree node. This change was made in the commit c8c61c09e38b ("arm64: dts: qcom: sdm845: Add interconnects property for display"), but was not reflected in the schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- .../de

[Freedreno] [PATCH v9 08/12] dt-bindings: display/msm: split dpu-sdm845 into DPU and MDSS parts

2022-10-24 Thread Dmitry Baryshkov
In order to make the schema more readable, split dpu-sdm845 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/dpu-sdm845.yaml | 148 -- .../bindings/display/ms

[Freedreno] [PATCH v9 10/12] dt-bindings: display/msm: split dpu-qcm2290 into DPU and MDSS parts

2022-10-24 Thread Dmitry Baryshkov
In order to make the schema more readable, split dpu-qcm2290 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/dpu-qcm2290.yaml | 148 -- .../display/msm/qcom,q

[Freedreno] [PATCH v9 04/12] dt-bindings: display/msm: move common DPU properties to dpu-common.yaml

2022-10-24 Thread Dmitry Baryshkov
Move properties common to all DPU DT nodes to the dpu-common.yaml. Note, this removes description of individual DPU port@ nodes. However such definitions add no additional value. The reg values do not correspond to hardware INTF indices. The driver discovers and binds these ports not paying any ca

[Freedreno] [PATCH v9 05/12] dt-bindings: display/msm: move common MDSS properties to mdss-common.yaml

2022-10-24 Thread Dmitry Baryshkov
Move properties common to all MDSS DT nodes to the mdss-common.yaml. This extends qcom,msm8998-mdss schema to allow interconnect nodes, which will be added later, once msm8998 gains interconnect support. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/dpu-

[Freedreno] [PATCH v9 06/12] dt-bindings: display/msm: split dpu-sc7180 into DPU and MDSS parts

2022-10-24 Thread Dmitry Baryshkov
In order to make the schema more readable, split dpu-sc7180 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/dpu-sc7180.yaml | 158 -- .../bindings/display/ms

[Freedreno] [PATCH v9 07/12] dt-bindings: display/msm: split dpu-sc7280 into DPU and MDSS parts

2022-10-24 Thread Dmitry Baryshkov
In order to make the schema more readable, split dpu-sc7280 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/dpu-sc7280.yaml | 162 -- .../bindings/display/ms

[Freedreno] [PATCH v9 09/12] dt-bindings: display/msm: split dpu-msm8998 into DPU and MDSS parts

2022-10-24 Thread Dmitry Baryshkov
In order to make the schema more readable, split dpu-msm8998 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../display/msm/qcom,msm8998-dpu.yaml | 95 +++ ...pu-msm8998.yaml =>

[Freedreno] [PATCH v9 11/12] dt-bindings: display/msm: add missing device nodes to mdss-* schemas

2022-10-24 Thread Dmitry Baryshkov
Add missing device nodes (DSI, PHYs, DP/eDP) to the existing MDSS schemas. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../display/msm/qcom,msm8998-mdss.yaml| 153 + .../display/msm/qcom,qcm2290-mdss.yaml| 81 + .../display/msm/qcom,sc7180-mdss.yaml

[Freedreno] [PATCH v9 12/12] dt-bindings: display/msm: add support for the display on SM8250

2022-10-24 Thread Dmitry Baryshkov
Add DPU and MDSS schemas to describe MDSS and DPU blocks on the Qualcomm SM8250 platform. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/mdss-common.yaml | 4 +- .../bindings/display/msm/qcom,sm8250-dpu.yaml | 92 + .../display/msm/qcom,sm8250-m

Re: [Freedreno] [PATCH v2 1/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-10-24 Thread Dmitry Baryshkov
On 24/10/2022 19:12, Rob Clark wrote: On Mon, Oct 24, 2022 at 8:14 AM Dmitry Baryshkov wrote: The function a6xx_create_address_space() is mostly a copy of adreno_iommu_create_address_space() with added quirk setting. Reuse the original function to do the work, while introducing the wrapper to

[Freedreno] [pull] drm/msm: drm-msm-fixes-2022-10-24 for v6.1-rc3

2022-10-24 Thread Rob Clark
Hi Dave, A few fixes for the v6.1 cycle. Summary below. The following changes since commit e8b595f7b058c7909e410f3e0736d95e8f909d01: drm/msm/hdmi: make hdmi_phy_8996 OF clk provider (2022-09-18 09:38:07 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/drm/msm.