Hi Inki,
GSCALERs in Exynos SoCs support conversion between wide range of image formats,
plus scaling and rotation.
Driver already supports mem2mem mode - via ExynosDRM IPP framework.
This patchset adds support for mem to display mode - framebuffers can
be converted, scaled and send directly to Display Controller. From DRM
framework's point of view every GSCALER exposes drm_plane which can be connected
to display controller (display panel or TV).
The feature is not well documented so the …
[View More]development was quite difficult -
a process of trial and error, vendor code analysis, guessing from datasheets.
Hopefully most of the issues were solved. I have developed and tested it on
TM2 device with panel and TV paths.
The patchset contains three parts:
1. Preparatory patches - mostly cleanup and refactoring of drm_crtc and drm_plane
related structures, to allow usage of planes which are not physically bound
to crtcs (01-13).
2. Adding local path support to GSCALER and DECON (14-20).
3. Few fixes of bugs existing already in the code but discovered due to added
local path support (21-23).
The patchset is based on exynos_drm_next plus my patchset adding zpos to DECON
and FIMD - 'drm/exynos: add support for dynamic zpos in DECON and FIMD' - it is
required to allow set z-pos position of GSCALER planes.
To simplify tests I have also created branch containing all required patches:
Repo: https://git.tizen.org/cgit/platform/kernel/linux-exynos
Branch: sandbox/ahajda/dev/exynos-drm-local-path
This is v2 version of the patchset. In this version I have moved code setting
cursor plane in crtc to separate patch together with code disabling fast cursor
updates - hardware does not support it. To keep bisectability DTS patches should
be applied before subsequent ones. It is rebased on today's exynos-drm-next.
Please be aware that DTS patches has been already applied to samsung-soc tree,
I left them here to simplify testing on exynos-drm-next, which is not in sync with
samsung-soc, for this reason I have moved them on the beginning of the patchset.
Regards
Andrzej
Andrzej Hajda (24):
arm64: dts: exynos: configure GSCALER related clocks
arm64: dts: exynos: add DSD/GSD clocks to DECONs and GSCALERs
drm/exynos: remove exynos_drm_plane.h header
drm/exynos: remove spare macro
drm/exynos: drop exynos_drm_plane_config structure
drm/exynos: add exynos_drm_crtc_init function
drm/exynos/decon5433: embed exynos_drm_crtc directly into context
drm/exynos/decon7: embed exynos_drm_crtc directly into context
drm/exynos/fimd: embed exynos_drm_crtc directly into context
drm/exynos/mixer: embed exynos_drm_crtc directly into context
drm/exynos/vidi: embed exynos_drm_crtc directly into context
drm/exynos: remove standalone exynos_drm_crtc leftovers
drm/exynos/vidi: remove encoder_to_vidi helper
drm/exynos: unify plane type assignment
drm/exynos: set primary plane in exynos_drm_crtc_init
drm/exynos: set cursor plane in exynos_drm_crtc_init
drm/exynos: add plane update/disable callbacks for planes
drm/exynos: add GSCALER plane capability
drm/exynos/gscaler: fix id assignement
drm/exynos/gscaler: add local path support
drm/exynos/decon5433: add local path support
drm/exynos/decon5433: wait for finish previous update
drm/exynos/gscaler: change supported color format BGRX8888 to XBGR8888
drm/exynos/gscaler: fix handling YVU420 pixel format
.../dts/exynos/exynos5433-tm2-common.dtsi | 6 +
arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 6 +-
arch/arm64/boot/dts/exynos/exynos5433.dtsi | 25 +-
drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 162 ++++++++-----
drivers/gpu/drm/exynos/exynos7_drm_decon.c | 66 +++--
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 46 ++--
drivers/gpu/drm/exynos/exynos_drm_crtc.h | 7 +-
drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 -
drivers/gpu/drm/exynos/exynos_drm_drv.h | 50 ++--
drivers/gpu/drm/exynos/exynos_drm_fb.c | 10 +-
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 85 +++----
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 229 ++++++++++++++----
drivers/gpu/drm/exynos/exynos_drm_plane.c | 84 ++++---
drivers/gpu/drm/exynos/exynos_drm_plane.h | 14 --
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 48 ++--
drivers/gpu/drm/exynos/exynos_mixer.c | 95 +++-----
drivers/gpu/drm/exynos/regs-decon5433.h | 6 +
drivers/gpu/drm/exynos/regs-gsc.h | 6 +
18 files changed, 538 insertions(+), 408 deletions(-)
delete mode 100644 drivers/gpu/drm/exynos/exynos_drm_plane.h
--
2.17.1
[View Less]
Hi Daniel,
just a gentle ping that you wanted to take a look at this.
Not much changed compared to the last version, only a minor bugfix in
the dma_resv_get_singleton error handling.
Regards,
Christian.
v5:
Add lost reset define.
v4:
Add necessary reset control for ast2600.
Add chip caps for futher use.
These code are test on AST2500 and AST2600 by below steps.
1. Add below config to turn VT and LOGO on.
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
CONFIG_LDISC_AUTOLOAD=y
CONFIG_DEVMEM=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
…
[View More]CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_CLUT224=y
2. The Linux logo will be shown on the screen, when the BMC boot in Linux.
v3:
Refine the patch for clear separate purpose.
Skip to send devicetree patch
v2:
Remove some unnecessary patch.
Refine for reviwer request.
v1:
First add patch.
Joel Stanley (2):
ARM: dts: aspeed: Add GFX node to AST2600
ARM: dts: aspeed: ast2600-evb: Enable GFX device
Tommy Haung (1):
dt-bindings:ast2600-clock Add CRT reset define
tommy-huang (4):
drm/aspeed: Update INTR_STS handling
drm/aspeed: Add AST2600 chip support
drm/aspeed: Add reset and clock for AST2600
arm:boot:dts:aspeed-g6 Add more gfx reset control
arch/arm/boot/dts/aspeed-ast2600-evb.dts | 18 +++++++
arch/arm/boot/dts/aspeed-g6.dtsi | 13 +++++
drivers/gpu/drm/aspeed/aspeed_gfx.h | 17 +++++-
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 16 ++++++
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 65 +++++++++++++++++++++--
include/dt-bindings/clock/ast2600-clock.h | 1 +
6 files changed, 124 insertions(+), 6 deletions(-)
--
2.17.1
[View Less]
Change in v4:
- change completment function to wait_for_event.
- release the mbox channel when device_link_add fail with cmdq
and still return 0 because drm can configure register by cpu.
Change in v3:
- fix return typo: modify -NOEDV to -ENODEV.
- add missing complete function in ddp_cmdq_cb.
Change in v2:
- rollback adding cmdq_mbox_flush in cmdq_suspend and add
blocking config mode for mtk_drm_crtc_atomic_disable.
- add return error when device_link_add fail.
- change the first …
[View More]parameter of device_link_add from dev
to priv->dev.
jason-jh.lin (2):
drm/mediatek: add wait_for_event for crtc disable by cmdq
drm/mediatek: add devlink to cmdq dev
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 51 ++++++++++++++++++++-----
1 file changed, 41 insertions(+), 10 deletions(-)
--
2.18.0
[View Less]
Restarting a display unit group can cause a visible flicker on the display.
Particularly when a LVDS display is connected to a Salvator board and an
HDMI display is (re)connected, then there will be 2 visible flickers on the
LVDS display:
1. during atomic_flush (The need_restart flag is set in this case by
rcar_du_vsp_enable.):
rcar_du_crtc_atomic_flush
rcar_du_crtc_update_planes
...
...
/* Restart the group if plane sources have changed. */
if (rcrtc->…
[View More]group->need_restart)
rcar_du_group_restart(rcrtc->group);
2. during atomic_enable:
rcar_du_crtc_atomic_enable
rcar_du_crtc_start
rcar_du_group_start_stop(rcrtc->group, true);
To avoid flickers in all use cases, do not restart DU groups on the Gen3
SoCs at all, since it is not required any more.
Signed-off-by: Michael Rodin <mrodin(a)de.adit-jv.com>
---
drivers/gpu/drm/rcar-du/rcar_du_group.c | 5 ++++-
drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c
index 8665a1d..ff0a1c8 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
@@ -250,7 +250,7 @@ void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
* when the display controller will have to be restarted.
*/
if (start) {
- if (rgrp->used_crtcs++ != 0)
+ if (rgrp->used_crtcs++ != 0 && rgrp->dev->info->gen != 3)
__rcar_du_group_start_stop(rgrp, false);
__rcar_du_group_start_stop(rgrp, true);
} else {
@@ -263,6 +263,9 @@ void rcar_du_group_restart(struct rcar_du_group *rgrp)
{
rgrp->need_restart = false;
+ if (rgrp->dev->info->gen == 3)
+ return;
+
__rcar_du_group_start_stop(rgrp, false);
__rcar_du_group_start_stop(rgrp, true);
}
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index b7fc5b0..a652c06 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -88,8 +88,6 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
* Ensure that the plane source configuration takes effect by requesting
* a restart of the group. See rcar_du_plane_atomic_update() for a more
* detailed explanation.
- *
- * TODO: Check whether this is still needed on Gen3.
*/
crtc->group->need_restart = true;
--
2.7.4
[View Less]
This series adds runtime PM support to Tegra drivers and enables core
voltage scaling for Tegra20/30 SoCs, resolving overheating troubles.
All patches in this series are interdependent and should go via Tegra tree
for simplicity.
Changelog:
v16: - Replaced redundant "context->client" with "client" in gr2d/3d
RPM patches, which was spotted by Michał Mirosław in v15.
- Added new patch that consolidates the RPM management of older
UAPI code path.
- Added stable tag …
[View More]to "submit: Add missing pm_runtime_mark_last_busy()"
patch and reordered it such that it could be backported without merge
conflicts.
v15: - Added r-b from Ulf Hansson to "soc/tegra: Enable runtime PM during
OPP state-syncing" patch and added extra sanity-check to this patch
which ensures that RPM is indeed enabled.
- Fixed double RPM-disable on unbind for drivers that used
devm_pm_runtime_enable() + pm_runtime_force_suspend().
- Added link with additional info to commit message of "regulators:
Prepare for suspend" patch.
v14: - Fixed missing runtime PM syncing on removal of drivers, which was
spotted by Ulf Hansson in v13.
- clk-device driver now resumes RPM on system suspend instead of
preparing clock which it backs. This was suggested by Ulf Hansson.
- clk-device driver now syncs power domain performance unconditionally
during driver's probe time since GENPD API allows to do this now.
It was spotted by Ulf Hansson.
- Added new "Enable runtime PM during OPP state-syncing" patch, which
allows drivers to sync state at any time. Previously drivers were
obligated to take care of enabling RPM at the "right" time.
- Moved runtime PM initialization/uninitialization of DRM drivers that
use host1x channel to host1x client init/deinit phase. I noticed that
there is UAF problem because RPM-suspend callback waits until channel
is idling and channel is already released/freed during driver's removal
phase.
- Added system suspend support to the new NVDEC DRM driver.
- Added missing pm_runtime_mark_last_busy() to DRM driver.
- Corrected VDE GENPD patch which previously made video decoder clock
always-enabled by mistake if legacy PD code path was used. It was
spotted while we were testing VDE on Tegra114 that doesn't support
GENPD yet.
- Added ack from Peter Chen to the USB patch that he gave to v13.
- Changed OPP table names in accordance to the new naming scheme
required by the recent core OPP binding.
- Added 500MHz memory OPP entry used by ASUS Transformer tablets.
v13: - Fixed compile-test error reported by build bot by reverting the
mmc/ patch to v11. The sdhci_suspend/resume_host() functions aren't
available with the disabled CONFIG_PM_SLEEP, some code needs the
ifdef.
- Added last r-b from Rob Herring for the DT patches.
- Corrected clk/ PM domain-support patch by not using the
devm_tegra_core_dev_init_opp_table_common() helper, which I
utilized in v12. The clk driver implements its own power domain
state syncing and common helper shouldn't be used. This fixes driver
probing for some clocks on some devices. It was reported by
Svyatoslav Ryhel for PLLE OPP error on T30 Asus Transformer tablet.
v12: - Added r-b from Rob Herring to the host1x binding patch.
- Added acks from Hans Verkuil to the video decoder patches.
- In the v11 changelog I forgot to mention that the clk-binding
patch was also changed with a corrected regex pattern and removed
'clocks' sub-node. This patch needs r-b or ack too.
- Added new "Rename 3d power domains" patch to match the DT schema
naming requirement. Thanks to David Heidelberg for spotting this
problem.
- Replaced #ifdef CONFIG_PM_SLEEP with maybe_unused in the MMC patch
to make code cleaner.
v11: - Added acks and r-b from Rob Herring, Mark Brown and Miquel Raynal
that were given to v8.
- Corrected order of the new memory controller reset entry in
device-trees and host1x DT binding patch, which was requested by
Rob Herring.
- Switched consumer drivers to use power domain state syncing done
by new Tegra's common OPP-initialization helper.
- Made use of new devm_pm_runtime_enable() helper that was added to
v5.15 kernel, where appropriate.
- Added "fuse: Use resource-managed helpers" patch.
- Converted Tegra20/30 clk drivers to a proper platform drivers,
which was requested by Thierry Reding.
- Removed clk-bulk API usage from the MMC patch, which was requested
by Thierry Reding.
- Changed CORE power domain name to "core" in a new patch
"Change name of core power domain".
- Misc small fixes for problems that I found since v8, like couple
typos in error code paths and restored working RPM for Tegra DRM
UAPI v1 that was removed in v8 by accident.
v9-v10: Figured out remaining GENPD API changes with Ulf Hansson and
Viresh Kumar. The OPP-sync helper that was used in v8 isn't needed
anymore because GENPD API now allows consumer drivers to
init rpm_pstate of power domains.
v8: - Added new generic dev_pm_opp_sync() helper that syncs OPP state with
hardware. All drivers changed to use it. This replaces GENPD attach_dev
callback hacks that were used in v7.
- Added new patch patch "soc/tegra: regulators: Prepare for suspend"
that fixes dying Tegra20 SoC after enabling VENC power domain during
resume from suspend. It matches to what downstream kernel does on
suspend/resume.
- After a second thought, I dropped patches which added RPM to memory
drivers since hardware is always-on and RPM not needed.
- Replaced the "dummy host1x driver" patch with new "Disable unused
host1x hardware" patch, since it's a cleaner solution.
Dmitry Osipenko (40):
soc/tegra: Enable runtime PM during OPP state-syncing
soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()
soc/tegra: Don't print error message when OPPs not available
dt-bindings: clock: tegra-car: Document new clock sub-nodes
clk: tegra: Support runtime PM and power domain
dt-bindings: host1x: Document OPP and power domain properties
dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and
GR3D
gpu: host1x: Add initial runtime PM and OPP support
gpu: host1x: Add host1x_channel_stop()
drm/tegra: submit: Add missing pm_runtime_mark_last_busy()
drm/tegra: dc: Support OPP and SoC core voltage scaling
drm/tegra: hdmi: Add OPP support
drm/tegra: gr2d: Support generic power domain and runtime PM
drm/tegra: gr3d: Support generic power domain and runtime PM
drm/tegra: vic: Stop channel on suspend
drm/tegra: nvdec: Stop channel on suspend
drm/tegra: submit: Remove pm_runtime_enabled() checks
drm/tegra: Consolidate runtime PM management of older UAPI codepath
usb: chipidea: tegra: Add runtime PM and OPP support
bus: tegra-gmi: Add runtime PM and OPP support
pwm: tegra: Add runtime PM and OPP support
mmc: sdhci-tegra: Add runtime PM and OPP support
mtd: rawnand: tegra: Add runtime PM and OPP support
spi: tegra20-slink: Add OPP support
media: dt: bindings: tegra-vde: Convert to schema
media: dt: bindings: tegra-vde: Document OPP and power domain
media: staging: tegra-vde: Support generic power domain
soc/tegra: fuse: Reset hardware
soc/tegra: fuse: Use resource-managed helpers
soc/tegra: regulators: Prepare for suspend
soc/tegra: pmc: Rename 3d power domains
soc/tegra: pmc: Rename core power domain
soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30
ARM: tegra: Rename CPU and EMC OPP table device-tree nodes
ARM: tegra: Add 500MHz entry to Tegra30 memory OPP table
ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees
ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees
ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x
ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x
ARM: tegra20/30: Disable unused host1x hardware
.../bindings/clock/nvidia,tegra20-car.yaml | 37 +
.../display/tegra/nvidia,tegra20-host1x.txt | 53 +
.../bindings/media/nvidia,tegra-vde.txt | 64 -
.../bindings/media/nvidia,tegra-vde.yaml | 119 ++
arch/arm/boot/dts/tegra124-apalis-emc.dtsi | 4 +-
.../arm/boot/dts/tegra124-jetson-tk1-emc.dtsi | 4 +-
arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi | 8 +-
.../arm/boot/dts/tegra124-nyan-blaze-emc.dtsi | 8 +-
.../boot/dts/tegra124-peripherals-opp.dtsi | 140 +-
.../boot/dts/tegra20-acer-a500-picasso.dts | 5 +-
arch/arm/boot/dts/tegra20-colibri.dtsi | 5 +-
.../boot/dts/tegra20-cpu-opp-microvolt.dtsi | 82 +-
arch/arm/boot/dts/tegra20-cpu-opp.dtsi | 82 +-
arch/arm/boot/dts/tegra20-harmony.dts | 3 +-
arch/arm/boot/dts/tegra20-paz00.dts | 3 +-
.../arm/boot/dts/tegra20-peripherals-opp.dtsi | 949 +++++++++++-
arch/arm/boot/dts/tegra20-seaboard.dts | 3 +-
arch/arm/boot/dts/tegra20-tamonten.dtsi | 3 +-
arch/arm/boot/dts/tegra20-trimslice.dts | 9 +
arch/arm/boot/dts/tegra20-ventana.dts | 1 +
arch/arm/boot/dts/tegra20.dtsi | 118 +-
.../tegra30-asus-nexus7-grouper-common.dtsi | 1 +
...30-asus-nexus7-grouper-memory-timings.dtsi | 12 +-
arch/arm/boot/dts/tegra30-beaver.dts | 1 +
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1 +
arch/arm/boot/dts/tegra30-colibri.dtsi | 17 +-
.../boot/dts/tegra30-cpu-opp-microvolt.dtsi | 144 +-
arch/arm/boot/dts/tegra30-cpu-opp.dtsi | 144 +-
arch/arm/boot/dts/tegra30-ouya.dts | 5 +-
.../arm/boot/dts/tegra30-peripherals-opp.dtsi | 1373 ++++++++++++++++-
arch/arm/boot/dts/tegra30.dtsi | 175 ++-
drivers/bus/tegra-gmi.c | 50 +-
drivers/clk/tegra/Makefile | 1 +
drivers/clk/tegra/clk-device.c | 199 +++
drivers/clk/tegra/clk-pll.c | 2 +-
drivers/clk/tegra/clk-super.c | 2 +-
drivers/clk/tegra/clk-tegra20.c | 77 +-
drivers/clk/tegra/clk-tegra30.c | 116 +-
drivers/clk/tegra/clk.c | 75 +-
drivers/clk/tegra/clk.h | 2 +
drivers/gpu/drm/tegra/dc.c | 79 +
drivers/gpu/drm/tegra/dc.h | 2 +
drivers/gpu/drm/tegra/drm.c | 11 +-
drivers/gpu/drm/tegra/gr2d.c | 174 ++-
drivers/gpu/drm/tegra/gr3d.c | 353 ++++-
drivers/gpu/drm/tegra/hdmi.c | 16 +-
drivers/gpu/drm/tegra/nvdec.c | 43 +-
drivers/gpu/drm/tegra/submit.c | 14 +-
drivers/gpu/drm/tegra/vic.c | 48 +-
drivers/gpu/host1x/channel.c | 8 +
drivers/gpu/host1x/debug.c | 15 +
drivers/gpu/host1x/dev.c | 150 +-
drivers/gpu/host1x/dev.h | 3 +-
drivers/gpu/host1x/hw/channel_hw.c | 44 +-
drivers/gpu/host1x/intr.c | 3 -
drivers/gpu/host1x/syncpt.c | 5 +-
drivers/mmc/host/sdhci-tegra.c | 81 +-
drivers/mtd/nand/raw/tegra_nand.c | 58 +-
drivers/pwm/pwm-tegra.c | 82 +-
drivers/soc/tegra/common.c | 29 +-
drivers/soc/tegra/fuse/fuse-tegra.c | 51 +-
drivers/soc/tegra/fuse/fuse-tegra20.c | 33 +-
drivers/soc/tegra/fuse/fuse.h | 1 +
drivers/soc/tegra/pmc.c | 14 +-
drivers/soc/tegra/regulators-tegra20.c | 99 ++
drivers/soc/tegra/regulators-tegra30.c | 122 ++
drivers/spi/spi-tegra20-slink.c | 9 +-
drivers/staging/media/tegra-vde/vde.c | 63 +-
drivers/usb/chipidea/ci_hdrc_tegra.c | 53 +-
include/linux/host1x.h | 1 +
include/soc/tegra/common.h | 15 +
71 files changed, 4930 insertions(+), 846 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt
create mode 100644 Documentation/devicetree/bindings/media/nvidia,tegra-vde.yaml
create mode 100644 drivers/clk/tegra/clk-device.c
--
2.33.1
[View Less]