[PATCH AUTOSEL 4.9 02/16] drm/msm: Set dma maximum segment size for mdss

2020-02-22 Thread Sasha Levin
From: Sean Paul [ Upstream commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff ] Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae0.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING:

[PATCH AUTOSEL 4.14 02/21] drm/msm: Set dma maximum segment size for mdss

2020-02-22 Thread Sasha Levin
From: Sean Paul [ Upstream commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff ] Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae0.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING:

[PATCH AUTOSEL 5.4 24/50] drm/amd/display: Limit minimum DPPCLK to 100MHz.

2020-02-22 Thread Sasha Levin
From: Yongqiang Sun [ Upstream commit 6c81917a0485ee2a1be0dc23321ac10ecfd9578b ] [Why] Underflow is observed when plug in a 4K@60 monitor with 1366x768 eDP due to DPPCLK is too low. [How] Limit minimum DPPCLK to 100MHz. Signed-off-by: Yongqiang Sun Reviewed-by: Eric Yang Acked-by:

[PATCH AUTOSEL 4.19 02/25] drm/msm: Set dma maximum segment size for mdss

2020-02-22 Thread Sasha Levin
From: Sean Paul [ Upstream commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff ] Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae0.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING:

[PATCH AUTOSEL 5.4 25/50] drm/amd/display: Add initialitions for PLL2 clock source

2020-02-22 Thread Sasha Levin
From: Isabel Zhang [ Upstream commit c134c3cabae46a56ab2e1f5e5fa49405e1758838 ] [Why] Starting from 14nm, the PLL is built into the PHY and the PLL is mapped to PHY on 1 to 1 basis. In the code, the DP port is mapped to a PLL that was not initialized. This causes DP to HDMI dongle to not light

[PATCH AUTOSEL 5.4 26/50] amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags

2020-02-22 Thread Sasha Levin
From: Daniel Kolesa [ Upstream commit 416611d9b6eebaeae58ed26cc7d23131c69126b1 ] On PowerPC, the compiler will tag object files with whether they use hard or soft float FP ABI and whether they use 64 or 128-bit long double ABI. On systems with 64-bit long double ABI, a tag will get emitted

[PATCH AUTOSEL 5.4 23/50] drm/amd/display: Check engine is not NULL before acquiring

2020-02-22 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 2b63d0ec0daf79ba503fa8bfa25e07dc3da274f3 ] [Why] Engine can be NULL in some cases, so we must not acquire it. [How] Check for NULL engine before acquiring. Signed-off-by: Aric Cyr Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex

[PATCH AUTOSEL 5.4 21/50] drm/amd/display: Do not set optimized_require to false after plane disable

2020-02-22 Thread Sasha Levin
From: Sung Lee [ Upstream commit df36f6cf23ada812930afa8ee76681d4ad307c61 ] [WHY] The optimized_require flag is needed to set watermarks and clocks lower in certain conditions. This flag is set to true and then set to false while programming front end in dcn20. [HOW] Do not set the flag to

[PATCH AUTOSEL 5.5 22/58] drm/amd/display: Do not set optimized_require to false after plane disable

2020-02-22 Thread Sasha Levin
From: Sung Lee [ Upstream commit df36f6cf23ada812930afa8ee76681d4ad307c61 ] [WHY] The optimized_require flag is needed to set watermarks and clocks lower in certain conditions. This flag is set to true and then set to false while programming front end in dcn20. [HOW] Do not set the flag to

[PATCH AUTOSEL 5.4 02/50] drm/msm: Set dma maximum segment size for mdss

2020-02-22 Thread Sasha Levin
From: Sean Paul [ Upstream commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff ] Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae0.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING:

[PATCH AUTOSEL 5.5 25/58] drm/amd/display: Limit minimum DPPCLK to 100MHz.

2020-02-22 Thread Sasha Levin
From: Yongqiang Sun [ Upstream commit 6c81917a0485ee2a1be0dc23321ac10ecfd9578b ] [Why] Underflow is observed when plug in a 4K@60 monitor with 1366x768 eDP due to DPPCLK is too low. [How] Limit minimum DPPCLK to 100MHz. Signed-off-by: Yongqiang Sun Reviewed-by: Eric Yang Acked-by:

[PATCH AUTOSEL 5.5 27/58] amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags

2020-02-22 Thread Sasha Levin
From: Daniel Kolesa [ Upstream commit 416611d9b6eebaeae58ed26cc7d23131c69126b1 ] On PowerPC, the compiler will tag object files with whether they use hard or soft float FP ABI and whether they use 64 or 128-bit long double ABI. On systems with 64-bit long double ABI, a tag will get emitted

[PATCH AUTOSEL 5.5 24/58] drm/amd/display: Check engine is not NULL before acquiring

2020-02-22 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 2b63d0ec0daf79ba503fa8bfa25e07dc3da274f3 ] [Why] Engine can be NULL in some cases, so we must not acquire it. [How] Check for NULL engine before acquiring. Signed-off-by: Aric Cyr Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex

[PATCH AUTOSEL 5.5 02/58] drm/msm: Set dma maximum segment size for mdss

2020-02-22 Thread Sasha Levin
From: Sean Paul [ Upstream commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff ] Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae0.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING:

[PATCH AUTOSEL 5.5 26/58] drm/amd/display: Add initialitions for PLL2 clock source

2020-02-22 Thread Sasha Levin
From: Isabel Zhang [ Upstream commit c134c3cabae46a56ab2e1f5e5fa49405e1758838 ] [Why] Starting from 14nm, the PLL is built into the PHY and the PLL is mapped to PHY on 1 to 1 basis. In the code, the DP port is mapped to a PLL that was not initialized. This causes DP to HDMI dongle to not light

Re: [PATCH 3/5] drm/lima: save task info dump when task fail

2020-02-22 Thread kbuild test robot
Hi Qiang, I love your patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [cannot apply to drm-exynos/exynos-drm-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next linus/master v5.6-rc2 next-20200221] [if your patch is applied to the wrong git tree, please drop

Re: [PATCH RFC v3 2/6] drm/sprd: add Unisoc's drm kms master

2020-02-22 Thread Sam Ravnborg
Hi Kevin/tang. Thanks for the quick and detailed feedback. Your questions are addressed below. Sam > > > +static int sprd_drm_bind(struct device *dev) > > > +{ > > > + struct drm_device *drm; > > > + struct sprd_drm *sprd; > > > + int err; > > > + > > > + drm =

Re: Support for early wakeup in DRM

2020-02-22 Thread jsanka
On 2020-02-21 09:20, Daniel Vetter wrote: On Thu, Feb 20, 2020 at 01:24:00PM -0800, jsa...@codeaurora.org wrote: On 2020-02-20 12:14, Daniel Vetter wrote: > On Thu, Feb 20, 2020 at 10:45:57AM -0800, jsa...@codeaurora.org wrote: > > Hello All, > > > > I am seeking recommendations for DRM

Re: [PATCH/RFC 3/3] drm: rcar_du: Constify drm_driver

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 05:24:30PM +0200, Laurent Pinchart wrote: > The drm_driver structure is never modified, make it const. The improves > security by avoiding writable function pointers. > > Signed-off-by: Laurent Pinchart I wonder whether there's some magic somewhere we could do to enlist

Re: [PATCH/RFC 2/3] drm: Use a const drm_driver through the DRM core

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 05:24:29PM +0200, Laurent Pinchart wrote: > The drm_driver structure contains pointers to functions, which can be an > attack vector if an attacker can corrupt the structure. The DRM core > however never modifies the structure, so it could be declared as const > in drivers.

Re: [PATCH/RFC 1/3] drm: Move legacy device list out of drm_driver

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 05:24:28PM +0200, Laurent Pinchart wrote: > The drm_driver structure contains a single field (legacy_dev_list) that > is modified by the DRM core, used to store a linked list of legacy DRM > devices associated with the driver. In order to make the structure > const, move

[PATCH 3/3] drm/pci: Unexport drm_get_pci_dev

2020-02-22 Thread Daniel Vetter
Only user left is the shadow attach for legacy drivers. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_pci.c | 22 +++--- include/drm/drm_pci.h | 11 --- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c

[PATCH 2/3] drm/radeon: Inline drm_get_pci_dev

2020-02-22 Thread Daniel Vetter
It's the last user, and more importantly, it's the last non-legacy user of anything in drm_pci.c. The only tricky bit is the agp initialization. But a close look shows that radeon does not use the drm_agp midlayer (the main use of that is drm_bufs for legacy drivers), and instead could use the

[PATCH 1/3] drm/amdgpu: Drop DRIVER_USE_AGP

2020-02-22 Thread Daniel Vetter
This doesn't do anything except auto-init drm_agp support when you call drm_get_pci_dev(). Which amdgpu stopped doing with commit b58c11314a1706bf094c489ef5cb28f76478c704 Author: Alex Deucher Date: Fri Jun 2 17:16:31 2017 -0400 drm/amdgpu: drop deprecated drm_get_pci_dev and drm_put_dev

Re: [PATCH 3/7] docs: fix broken references to text files

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 10:00:03AM +0100, Mauro Carvalho Chehab wrote: > Several references got broken due to txt to ReST conversion. > > Several of them can be automatically fixed with: > > scripts/documentation-file-ref-check --fix > > Signed-off-by: Mauro Carvalho Chehab > --- >

[PATCH v7.1 09/54] drm/bridge: Extend bridge API to disable connector creation

2020-02-22 Thread Laurent Pinchart
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pretty well so far, but causes several issues: - It prevents supporting more complex display pipelines where DRM connector operations are split over multiple

[PATCH v7.1 20/54] drm: Add helper to create a connector for a chain of bridges

2020-02-22 Thread Laurent Pinchart
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pretty well so far, but causes several issues: - It prevents supporting more complex display pipelines where DRM connector operations are split over multiple

[PATCH v7.1 06/54] drm/bridge: Improve overview documentation

2020-02-22 Thread Laurent Pinchart
Clean up the drm_bridge overview documentation, and expand the operations documentation to provide more details on API usage. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter --- Change since v7: - Detail how bridge operations are used by atomic helpers ---

Re: [PATCH v7 20/54] drm: Add helper to create a connector for a chain of bridges

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 4:01 PM Laurent Pinchart wrote: > > Most bridge drivers create a DRM connector to model the connector at the > output of the bridge. This model is historical and has worked pretty > well so far, but causes several issues: > > - It prevents supporting more complex display

Re: [PATCH v7 07/54] drm/bridge: Add connector-related bridge operations and data

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 4:01 PM Laurent Pinchart wrote: > > To support implementation of DRM connectors on top of DRM bridges > instead of by bridges, the drm_bridge needs to expose new operations and > data: > > - Output detection, hot-plug notification, mode retrieval and EDID > retrieval

Re: [PATCH v7 06/54] drm/bridge: Improve overview documentation

2020-02-22 Thread Laurent Pinchart
Hi Daniel, On Sat, Feb 22, 2020 at 04:32:58PM +0100, Daniel Vetter wrote: > On Sat, Feb 22, 2020 at 4:01 PM Laurent Pinchart wrote: > > > > Clean up the drm_bridge overview documentation, and expand the > > operations documentation to provide more details on API usage. > > > > Signed-off-by:

Re: [PATCH v7 06/54] drm/bridge: Improve overview documentation

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 4:01 PM Laurent Pinchart wrote: > > Clean up the drm_bridge overview documentation, and expand the > operations documentation to provide more details on API usage. > > Signed-off-by: Laurent Pinchart > --- > Documentation/gpu/drm-kms-helpers.rst | 6 +-- >

[PATCH/RFC 1/3] drm: Move legacy device list out of drm_driver

2020-02-22 Thread Laurent Pinchart
The drm_driver structure contains a single field (legacy_dev_list) that is modified by the DRM core, used to store a linked list of legacy DRM devices associated with the driver. In order to make the structure const, move the field out to a global variable. This requires locking access to the

[PATCH/RFC 3/3] drm: rcar_du: Constify drm_driver

2020-02-22 Thread Laurent Pinchart
The drm_driver structure is never modified, make it const. The improves security by avoiding writable function pointers. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH/RFC 0/3] Constify drm_driver

2020-02-22 Thread Laurent Pinchart
Hello, This patch series makes it possible for DRM drivers to declare their struct drm_driver as a static const. This improves security by avoiding function pointers in writable memory. The change turned out to be fairly easy, with preparation in patch 1/3 that moves the only non-const field out

[PATCH/RFC 2/3] drm: Use a const drm_driver through the DRM core

2020-02-22 Thread Laurent Pinchart
The drm_driver structure contains pointers to functions, which can be an attack vector if an attacker can corrupt the structure. The DRM core however never modifies the structure, so it could be declared as const in drivers. Modify the DRM core to take const struct drm_driver pointers in all APIs.

Re: [PATCH 18/51] drm/: Use drmm_add_final_kfree

2020-02-22 Thread Russell King - ARM Linux admin
On Fri, Feb 21, 2020 at 10:02:46PM +0100, Daniel Vetter wrote: > These are the leftover drivers that didn't have a ->release hook that > needed to be updated. > > Signed-off-by: Daniel Vetter > Cc: "James (Qian) Wang" > Cc: Liviu Dudau > Cc: Mihail Atanassov > Cc: Russell King > Cc: Hans de

[PATCH v7 51/54] drm/omap: Hardcode omap_connector type to DSI

2020-02-22 Thread Laurent Pinchart
The omap_connector implementation is now used for DSI only. Hardcode its type and drop unused code. Signed-off-by: Laurent Pinchart Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/base.c | 23 --

[PATCH v7 54/54] drm/omap: dss: Remove unused omap_dss_device operations

2020-02-22 Thread Laurent Pinchart
The omap_dss_device .pre_enable(), .post_disable() and .set_timings() are not used anymore. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/base.c | 26 ---

[PATCH v7 21/54] drm/omap: dss: Cleanup DSS ports on initialisation failure

2020-02-22 Thread Laurent Pinchart
When the DSS initialises its output DPI and SDI ports, failures don't clean up previous successfully initialised ports. This can lead to resource leak or memory corruption. Fix it. Reported-by: Hans Verkuil Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Acked-by: Sam Ravnborg

[PATCH v7 53/54] drm/omap: dss: Remove unused omapdss_of_find_connected_device() function

2020-02-22 Thread Laurent Pinchart
The omapdss_of_find_connected_device() function isn't used anymore, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/Makefile | 2 +- drivers/gpu/drm/omapdrm/dss/dss-of.c | 28

[PATCH v7 52/54] drm/omap: dss: Inline the omapdss_display_get() function

2020-02-22 Thread Laurent Pinchart
Inline the omapdss_display_get() in its only caller to simplify the code. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/display.c | 9 - drivers/gpu/drm/omapdrm/dss/omapdss.h | 1

[PATCH v7 40/54] drm/omap: Remove HPD, detect and EDID omapdss operations

2020-02-22 Thread Laurent Pinchart
Due to the removal of several omapdrm display drivers, the omapdss HPD, detected and EDID operations are not used anymore. Remove them and all related code. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 39/54] drm/omap: Switch the HDMI and VENC outputs to drm_bridge

2020-02-22 Thread Laurent Pinchart
The TPD12S015, OPA362 and analog and HDMI connectors are now supported by DRM bridge drivers, and the omapdrm HDMI and VENC outputs can be handled through the drm_bridge API. Switch the outputs to drm_bridge by making the next bridge mandatory and removing the related omapdrm-specific display

[PATCH v7 20/54] drm: Add helper to create a connector for a chain of bridges

2020-02-22 Thread Laurent Pinchart
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pretty well so far, but causes several issues: - It prevents supporting more complex display pipelines where DRM connector operations are split over multiple

[PATCH v7 34/54] drm/omap: hdmi5: Move mode set, enable and disable operations to bridge

2020-02-22 Thread Laurent Pinchart
Move the omap_dss_device .set_timings(), .enable() and .disable() operations to the drm_bridge functions. As the drm_bridge for the HDMI encoder is unconditionally registered and attached, those operations will be called at the appropriate time. The omapdss device .set_infoframe() and

[PATCH v7 48/54] drm/omap: dpi: Register a drm_bridge

2020-02-22 Thread Laurent Pinchart
In order to integrate with a chain of drm_bridge, the internal DPI output has to expose its operations through the drm_bridge API. Register a bridge at initialisation time to do so and remove the omap_dss_device operations that are now unused. Signed-off-by: Laurent Pinchart Tested-by: Sebastian

[PATCH v7 50/54] drm/omap: sdi: Register a drm_bridge

2020-02-22 Thread Laurent Pinchart
In order to integrate with a chain of drm_bridge, the internal SDI output has to expose its operations through the drm_bridge API. Register a bridge at initialisation time to do so and remove the omap_dss_device operations that are now unused. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi

[PATCH v7 23/54] drm/omap: Factor out display type to connector type conversion

2020-02-22 Thread Laurent Pinchart
Move the code that computes the DRM connector type for the omapdss_device display type to a new omapdss_device_connector_type() function for later reuse. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Acked-by: Sam Ravnborg Tested-by: Sebastian Reichel Reviewed-by: Sebastian

[PATCH v7 43/54] drm/omap: hdmi4: Simplify EDID read

2020-02-22 Thread Laurent Pinchart
Now that the omap_dss_device EDID read operation has been removed, simplify the bridge-based EDID access by merging multiple functions together. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 44/54] drm/omap: hdmi5: Simplify EDID read

2020-02-22 Thread Laurent Pinchart
Now that the omap_dss_device EDID read operation has been removed, simplify the bridge-based EDID access by merging multiple functions together. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 49/54] drm/omap: sdi: Sort includes alphabetically

2020-02-22 Thread Laurent Pinchart
This makes it easier to quickly locate duplicate includes. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/sdi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v7 33/54] drm/omap: hdmi4: Move mode set, enable and disable operations to bridge

2020-02-22 Thread Laurent Pinchart
Move the omap_dss_device .set_timings(), .enable() and .disable() operations to the drm_bridge functions. As the drm_bridge for the HDMI encoder is unconditionally registered and attached, those operations will be called at the appropriate time. The omapdss device .set_infoframe() and

[PATCH v7 35/54] drm/omap: hdmi4: Implement drm_bridge .hpd_notify() operation

2020-02-22 Thread Laurent Pinchart
The HDMI4 encoder is transitioning to the drm_bridge API, implement the last missing operation. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 10 ++ 1 file changed, 10

[PATCH v7 38/54] drm/omap: Create connector for bridges

2020-02-22 Thread Laurent Pinchart
Use the drm_bridge_connector helper to create a connector for pipelines that use drm_bridge. This allows splitting connector operations across multiple bridges when necessary, instead of having the last bridge in the chain creating the connector and handling all connector operations internally.

[PATCH v7 42/54] drm/omap: venc: Remove omap_dss_device operations

2020-02-22 Thread Laurent Pinchart
Now that the VENC output is driven fully through the drm_bridge API its omap_dss_device operations are not used anymore. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/venc.c

[PATCH v7 32/54] drm/omap: hdmi5: Register a drm_bridge for EDID read

2020-02-22 Thread Laurent Pinchart
In order to integrate with a chain of drm_bridge, the internal HDMI5 encoder has to expose the EDID read operation through the drm_bridge API. Register a bridge at initialisation time to do so. For the time being make the next bridge in the chain optional as the HDMI output is still based on

[PATCH v7 45/54] drm/omap: dpi: Sort includes alphabetically

2020-02-22 Thread Laurent Pinchart
This makes it easier to quickly locate duplicate includes. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dpi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH v7 30/54] drm/omap: hdmi5: Rework EDID read to isolate data read

2020-02-22 Thread Laurent Pinchart
In preparation of adding DRM bridge support to the hdmi5 encoder code, rework the EDID read to isolate data read. The hdmi_read_edid() function is the main entry point. It performs all initialisation steps required prior to reading the EDID (such as ensuring the device is powered on), as well as

[PATCH v7 31/54] drm/omap: hdmi4: Register a drm_bridge for EDID read

2020-02-22 Thread Laurent Pinchart
In order to integrate with a chain of drm_bridge, the internal HDMI4 encoder has to expose the EDID read operation through the drm_bridge API. Register a bridge at initialisation time to do so. For the time being make the next bridge in the chain optional as the HDMI output is still based on

[PATCH v7 24/54] drm/omap: Use the drm_panel_bridge API

2020-02-22 Thread Laurent Pinchart
Replace the manual panel handling code by a drm_panel_bridge. This simplifies the driver and allows all components in the display pipeline to be treated as bridges, paving the way to generic connector handling. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian

[PATCH v7 37/54] drm/omap: venc: Register a drm_bridge

2020-02-22 Thread Laurent Pinchart
In order to integrate with a chain of drm_bridge, the internal VENC encoder has to expose the mode valid, fixup and set, the enable and disable and the get modes operations through the drm_bridge API. Register a bridge at initialisation time to do so. Most of those operations are removed from the

[PATCH v7 08/54] drm/bridge: Add interlace_allowed flag to drm_bridge

2020-02-22 Thread Laurent Pinchart
In preparation for a connector creation helper based on a chain of bridges, add a flag to the drm_bridge structure to report support for interlaced modes. This will be used to set the connector's interlace_allowed flag. Signed-off-by: Laurent Pinchart Tested-by: Sebastian Reichel Reviewed-by:

[PATCH v7 46/54] drm/omap: dpi: Reorder functions in sections

2020-02-22 Thread Laurent Pinchart
Group functions based on their purpose and split them in sections to make the source code easier to navigate. No functional change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 26/54] drm/omap: Add infrastructure to support drm_bridge local to DSS outputs

2020-02-22 Thread Laurent Pinchart
In order to support drm_bridge-based pipeline, the internal HDMI encoders will need to expose the EDID read operation through the drm_bridge API, and thus to expose a drm_bridge instance corresponding to the encoder. The HDMI encoders are however handled as omap_dss_device instances, which

[PATCH v7 22/54] drm/omap: Simplify HDMI mode and infoframe configuration

2020-02-22 Thread Laurent Pinchart
Remove the omap_connector_get_hdmi_mode() function as the HDMI mode can be accessed directly from the connector's display info. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Acked-by: Sam Ravnborg Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 47/54] drm/omap: dpi: Simplify clock setting API

2020-02-22 Thread Laurent Pinchart
The dpi_set_pll_clk() and dpi_set_dispc_clk() return various information through pointer arguments that are never used by the callers. Remove them to simplify the clock setting API. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian

[PATCH v7 25/54] drm/omap: dss: Fix output next device lookup in DT

2020-02-22 Thread Laurent Pinchart
The DSS core looks up the next device connected to an output by traversing the OF graph. It currently hardcodes the local port number to 0, which breaks any output with a different port number (SDI on OMAP3 and any DPI output but the first one). Fix this by repurposing the currently unused

[PATCH v7 36/54] drm/omap: dss: Remove .set_hdmi_mode() and .set_infoframe() operations

2020-02-22 Thread Laurent Pinchart
The omapdss_hdmi_ops .set_hdmi_mode() and .set_infoframe() operations operations are not used anymore, remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 ---

[PATCH v7 16/54] drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter

2020-02-22 Thread Laurent Pinchart
The TI TPD12S015 is an HDMI level shifter and ESD protector controlled through GPIOs. Add a DRM bridge driver for the device. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Acked-by: Sam Ravnborg Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- Changes since v2:

[PATCH v7 19/54] drm/bridge: tfp410: Allow operation without drm_connector

2020-02-22 Thread Laurent Pinchart
The tfp410 driver can operate as part of a pipeline where the drm_connector is created by the display controller. Enable this mode of operation by skipping creation of a drm_connector internally. Signed-off-by: Laurent Pinchart Reviewed-by: Boris Brezillon Acked-by: Sam Ravnborg Tested-by:

[PATCH v7 12/54] drm/bridge: simple-bridge: Add support for non-VGA bridges

2020-02-22 Thread Laurent Pinchart
Create a new simple_bridge_info structure that stores information about the bridge model, and store the bridge timings in there, along with the connector type. Use that new structure for of_device_id data. This enables support for non-VGA bridges. Signed-off-by: Laurent Pinchart Reviewed-by:

[PATCH v7 17/54] drm/bridge: panel: Implement bridge connector operations

2020-02-22 Thread Laurent Pinchart
Implement the newly added bridge connector operations, allowing the usage of drm_bridge_panel with drm_bridge_connector. Signed-off-by: Laurent Pinchart Reviewed-by: Boris Brezillon Reviewed-by: Sam Ravnborg Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- Changes since v2: -

[PATCH v7 28/54] drm/omap: hdmi: Allocate EDID in the .read_edid() operation

2020-02-22 Thread Laurent Pinchart
Bring the omapdss-specific .read_edid() operation in sync with the drm_bridge .get_edid() operation to ease code reuse. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel --- Changes since v1: - Keep MAX_EDID macro ---

[PATCH v7 03/54] drm/edid: Add flag to drm_display_info to identify HDMI sinks

2020-02-22 Thread Laurent Pinchart
The drm_display_info structure contains many fields related to HDMI sinks, but none that identifies if a sink compliant with CEA-861 (EDID) shall be treated as an HDMI sink or a DVI sink. Add such a flag, and populate it according to section 8.3.3 ("DVI/HDMI Device Discrimination") of the HDMI

[PATCH v7 02/54] drm/connector: Add helper to get a connector type name

2020-02-22 Thread Laurent Pinchart
drm_connector.c contains a map of connector types (DRM_MODE_CONNECTOR_*) to name strings, but doesn't expose it. This leads to drivers having to store a similar map. Add a new drm_get_connector_type_name() helper function that return a name string for a connector type. Signed-off-by: Laurent

[PATCH v7 29/54] drm/omap: hdmi4: Rework EDID read to isolate data read

2020-02-22 Thread Laurent Pinchart
In preparation of adding DRM bridge support to the hdmi4 encoder code, rework the EDID read to isolate data read. The hdmi_read_edid() function is the main entry point. It performs all initialisation steps required prior to reading the EDID (such as ensuring the device is powered on), as well as

[PATCH v7 41/54] drm/omap: hdmi: Remove omap_dss_device operations

2020-02-22 Thread Laurent Pinchart
Now that the HDMI outputs are driven fully through the drm_bridge API their omap_dss_device operations are not used anymore. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel Reviewed-by: Sebastian Reichel ---

[PATCH v7 00/54] drm/omap: Replace custom display drivers with drm_bridge and drm_panel

2020-02-22 Thread Laurent Pinchart
Hello, This patch series is the sixth attempt to (nearly, see [1]) complete the rework of the omapdrm driver to move to drm_bridge and drm_panel. Version 2, available at [2], explains in its long cover letter the rationale for the changes. I won't duplicate it here as it is still valid as-is.

[PATCH v7 11/54] drm/bridge: dumb-vga-dac: Rename driver to simple-bridge

2020-02-22 Thread Laurent Pinchart
The dumb-vga-dac driver can support simple DRM bridges without being limited to VGA DACs. Rename it to simple-bridge. Signed-off-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Reviewed-by: Boris Brezillon Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Tested-by: Sebastian Reichel

[PATCH v7 06/54] drm/bridge: Improve overview documentation

2020-02-22 Thread Laurent Pinchart
Clean up the drm_bridge overview documentation, and expand the operations documentation to provide more details on API usage. Signed-off-by: Laurent Pinchart --- Documentation/gpu/drm-kms-helpers.rst | 6 +-- drivers/gpu/drm/drm_bridge.c | 76 --- 2 files

[PATCH v7 09/54] drm/bridge: Extend bridge API to disable connector creation

2020-02-22 Thread Laurent Pinchart
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pretty well so far, but causes several issues: - It prevents supporting more complex display pipelines where DRM connector operations are split over multiple

[PATCH v7 07/54] drm/bridge: Add connector-related bridge operations and data

2020-02-22 Thread Laurent Pinchart
To support implementation of DRM connectors on top of DRM bridges instead of by bridges, the drm_bridge needs to expose new operations and data: - Output detection, hot-plug notification, mode retrieval and EDID retrieval operations - Bitmask of supported operations - Bridge output type - I2C

[PATCH v7 27/54] drm/omap: dss: Make omap_dss_device_ops optional

2020-02-22 Thread Laurent Pinchart
As part of the move to drm_bridge ops, the dssdev ops will become empty for some of the internal encoders. Make them optional in the driver to allow them to be removed completely, easing the transition. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Tested-by: Sebastian Reichel

[PATCH v7 14/54] drm/bridge: simple-bridge: Add support for the TI OPA362

2020-02-22 Thread Laurent Pinchart
The TI OPA362 is an analog video amplifier controlled through a GPIO. Add support for it to the simple-bridge driver. Signed-off-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Reviewed-by: Boris Brezillon Reviewed-by: Maxime Ripard Reviewed-by: Tomi Valkeinen Acked-by: Sam Ravnborg

[PATCH v7 18/54] drm/bridge: tfp410: Replace manual connector handling with bridge

2020-02-22 Thread Laurent Pinchart
Now that a driver is available for display connectors, replace the manual connector handling code with usage of the DRM bridge API. The tfp410 driver doesn't deal with the display connector directly anymore, but still delegates drm_connector operations to the next bridge. This brings us one step

[PATCH v7 15/54] drm/bridge: Add bridge driver for display connectors

2020-02-22 Thread Laurent Pinchart
Display connectors are modelled in DT as a device node, but have so far been handled manually in several bridge drivers. This resulted in duplicate code in several bridge drivers, with slightly different (and thus confusing) logics. In order to fix this, implement a bridge driver for display

[PATCH v7 01/54] video: hdmi: Change return type of hdmi_avi_infoframe_init() to void

2020-02-22 Thread Laurent Pinchart
The hdmi_avi_infoframe_init() never needs to return an error, change its return type to void. Signed-off-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Acked-by: Bartlomiej Zolnierkiewicz Reviewed-by: Boris Brezillon Acked-by: Sam Ravnborg Tested-by: Sebastian Reichel Reviewed-by:

[PATCH v7 04/54] drm/bridge: Document the drm_encoder.bridge_chain field as private

2020-02-22 Thread Laurent Pinchart
The drm_encoder.bridge_chain is not meant to be touched manually by drivers. Make this clear in the documentation. Signed-off-by: Laurent Pinchart --- include/drm/drm_encoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_encoder.h

[PATCH v7 10/54] drm/bridge: dumb-vga-dac: Rename internal symbols to simple-bridge

2020-02-22 Thread Laurent Pinchart
The dumb-vga-dac driver is a simple DRM bridge driver for simple VGA DACs that don't require configuration. Other non-VGA bridges fall in a similar category, and would benefit from a common driver. Prepare for this by renaming the internal symbols from dumb-vga-dac to simple-bridge.

[PATCH v7 13/54] drm/bridge: simple-bridge: Add support for enable GPIO

2020-02-22 Thread Laurent Pinchart
If an enable GPIO is declared in the firmware, assert it when enabling the bridge and deassert it when disabling it. Signed-off-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Reviewed-by: Stefan Agner Reviewed-by: Boris Brezillon Reviewed-by: Maxime Ripard Acked-by: Sam Ravnborg Tested-by:

[PATCH v7 05/54] drm/bridge: Fix atomic state ops documentation

2020-02-22 Thread Laurent Pinchart
The drm_bridge_funcs atomic_state_duplicate and atomic_state_destroy operations are erroneously documented as having a default implementation if not implemented in bridge drivers. This isn't correct, fix the documentation. Signed-off-by: Laurent Pinchart --- include/drm/drm_bridge.h | 20

Re: [PATCH] drm/i915/gt: remove redundant assignment to variable dw

2020-02-22 Thread Chris Wilson
Quoting Colin King (2020-02-22 13:47:55) > From: Colin Ian King > > Variable dw is being initialized with a value that is never read, > it is assigned a new value later on. The assignment is redundant > and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King

[PATCH] drm/i915/gt: remove redundant assignment to variable dw

2020-02-22 Thread Colin King
From: Colin Ian King Variable dw is being initialized with a value that is never read, it is assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-

Re: [PATCH 45/51] drm/gm12u320: Simplify upload work

2020-02-22 Thread Daniel Vetter
On Sat, Feb 22, 2020 at 1:30 PM Hans de Goede wrote: > > Hi, > > On 2/21/20 10:03 PM, Daniel Vetter wrote: > > Instead of having a work item that never stops (which really should be > > a kthread), with a dedicated workqueue to not upset anyone else, use a > > delayed work. A bunch of changes: >

Re: [PATCH 04/12] drm: Nuke mode->vrefresh

2020-02-22 Thread Sam Ravnborg
Hi Ville. Nice patch - and diffstat looks good: > 63 files changed, 217 insertions(+), 392 deletions(-) There is an item in the Documentation/gpu/todo.rst that describes this. Could you drop this from todo.rst in this patch too. > diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c

Re: [PATCH 45/51] drm/gm12u320: Simplify upload work

2020-02-22 Thread Hans de Goede
Hi, On 2/21/20 10:03 PM, Daniel Vetter wrote: Instead of having a work item that never stops (which really should be a kthread), with a dedicated workqueue to not upset anyone else, use a delayed work. A bunch of changes: - We can throw out all the custom wakeup and requeue logic and state

Re: [PATCH] drm/panel: ld9040: add MODULE_DEVICE_TABLE with SPI IDs

2020-02-22 Thread Sam Ravnborg
Hi Marek. On Thu, Feb 20, 2020 at 01:07:00PM +0100, Marek Szyprowski wrote: > Add proper MODULE_DEVICE_TABLE structure with SPI IDs to allow proper > creation of SPI modalias string and fix autoloading module for this driver. > > Signed-off-by: Marek Szyprowski Thanks, applied to

Re: [PATCH 3/3] drm/panel: simple: fix osd070t1718_19ts sync drive edge

2020-02-22 Thread Sam Ravnborg
Hi Tomi. > +++ b/drivers/gpu/drm/panel/panel-simple.c > @@ -2397,7 +2397,8 @@ static const struct panel_desc > osddisplays_osd070t1718_19ts = { > .height = 91, > }, > .bus_format = MEDIA_BUS_FMT_RGB888_1X24, > -

Re: [PATCH 44/51] drm/gm12u320: Use helpers for shutdown/suspend/resume

2020-02-22 Thread Hans de Goede
Hi, On 2/21/20 10:03 PM, Daniel Vetter wrote: Also there's a race in the disconnect implemenation. First shut down, then unplug, leaves a window where userspace could sneak in and restart the entire machinery. With this we can also delete the very un-atomic global pipe_enabled tracking.

  1   2   >