Age | Commit message (Collapse) | Author | Files | Lines |
|
The original logic is ok for primary display, but will not find out
component for external display.
For example, plane->index is 6 for external display, but there are only
2 layer nr in external display, and this condition will never happen:
if (plane->index < (count + mtk_ddp_comp_layer_nr(comp)))
Fix this by using the offset of the plane to mtk_crtc->planes as index,
instead of plane->index.
Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane")
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: Pi-Hsun Shih <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't
check for it. Add check for it.
Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane")
Signed-off-by: Pi-Hsun Shih <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Acked-by: CK Hu <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v5.6:
UAPI Changes:
- Add support for DMA-BUF HEAPS.
Cross-subsystem Changes:
- mipi dsi definition updates, pulled into drm-intel as well.
- Add lockdep annotations for dma_resv vs mmap_sem and fs_reclaim.
- Remove support for dma-buf kmap/kunmap.
- Constify fb_ops in all fbdev drivers, including drm drivers and drm-core, and media as well.
Core Changes:
- Small cleanups to ttm.
- Fix SCDC definition.
- Assorted cleanups to core.
- Add todo to remove load/unload hooks, and use generic fbdev emulation.
- Assorted documentation updates.
- Use blocking ww lock in ttm fault handler.
- Remove drm_fb_helper_fbdev_setup/teardown.
- Warning fixes with W=1 for atomic.
- Use drm_debug_enabled() instead of drm_debug flag testing in various drivers.
- Fallback to nontiled mode in fbdev emulation when not all tiles are present. (Later on reverted)
- Various kconfig indentation fixes in core and drivers.
- Fix freeing transactions in dp-mst correctly.
- Sean Paul is steping down as core maintainer. :-(
- Add lockdep annotations for atomic locks vs dma-resv.
- Prevent use-after-free for a bad job in drm_scheduler.
- Fill out all block sizes in the P01x and P210 definitions.
- Avoid division by zero in drm/rect, and fix bounds.
- Add drm/rect selftests.
- Add aspect ratio and alternate clocks for HDMI 4k modes.
- Add todo for drm_framebuffer_funcs and fb_create cleanup.
- Drop DRM_AUTH for prime import/export ioctls.
- Clear DP-MST payload id tables downstream when initializating.
- Fix for DSC throughput definition.
- Add extra FEC definitions.
- Fix fake offset in drm_gem_object_funs.mmap.
- Stop using encoder->bridge in core directly
- Handle bridge chaining slightly better.
- Add backlight support to drm/panel, and use it in many panel drivers.
- Increase max number of y420 modes from 128 to 256, as preparation to add the new modes.
Driver Changes:
- Small fixes all over.
- Fix documentation in vkms.
- Fix mmap_sem vs dma_resv in nouveau.
- Small cleanup in komeda.
- Add page flip support in gma500 for psb/cdv.
- Add ddc symlink in the connector sysfs directory for many drivers.
- Add support for analogic an6345, and fix small bugs in it.
- Add atomic modesetting support to ast.
- Fix radeon fault handler VMA race.
- Switch udl to use generic shmem helpers.
- Unconditional vblank handling for mcde.
- Miscellaneous fixes to mcde.
- Tweak debug output from komeda using debugfs.
- Add gamma and color transform support to komeda for DOU-IPS.
- Add support for sony acx424AKP panel.
- Various small cleanups to gma500.
- Use generic fbdev emulation in udl, and replace udl_framebuffer with generic implementation.
- Add support for Logic PD Type 28 panel.
- Use drm_panel_* wrapper functions in exynos/tegra/msm.
- Add devicetree bindings for generic DSI panels.
- Don't include drm_pci.h directly in many drivers.
- Add support for begin/end_cpu_access in udmabuf.
- Stop using drm_get_pci_dev in gma500 and mga200.
- Fixes to UDL damage handling, and use dma_buf_begin/end_cpu_access.
- Add devfreq thermal support to panfrost.
- Fix hotplug with daisy chained monitors by removing VCPI when disabling topology manager.
- meson: Add support for OSD1 plane AFBC commit.
- Stop displaying garbage when toggling ast primary plane on/off.
- More cleanups and fixes to UDL.
- Add D32 suport to komeda.
- Remove globle copy of drm_dev in gma500.
- Add support for Boe Himax8279d MIPI-DSI LCD panel.
- Add support for ingenic JZ4770 panel.
- Small null pointer deference fix in ingenic.
- Remove support for the special tfp420 driver, as there is a generic way to do it.
Signed-off-by: Daniel Vetter <[email protected]>
From: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
There are some extra data transfer in dsi.
ex. LPX, hs_prepare, hs_zero, hs_exit and the sof/eof of dsi packet.
This signal will enlarge the line time. So the real frame on dsi bus
will be lower than calc by video timing.
So dsi driver reduces the hbp and hfp to keep the line time.
Fixes: 7a5bc4e22ecf ("drm/mediatek: change the dsi phytiming calculate method")
Signed-off-by: Jitao Shi <[email protected]>
Tested-by: Hsin-Yi Wang <[email protected]>
Tested-by: Enric Balletbo i Serra <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
To facilitate moving connector creation to display drivers,
decouple the drm_connector from drm_panel.
This patch adds a connector argument to drm_panel_get_modes().
All users of drm_panel_get_modes() already had the connector
available, so updating users was trivial.
With this patch drm_panel no longer keeps a reference to the drm_connector.
Signed-off-by: Sam Ravnborg <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Jeffrey Hugo <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Alison Wang <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Kieran Bingham <[email protected]>
Cc: Sandy Huang <[email protected]>
Cc: "Heiko Stübner" <[email protected]>
Cc: Benjamin Gaignard <[email protected]>
Cc: Vincent Abriou <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Jonathan Hunter <[email protected]>
Cc: Torsten Duwe <[email protected]>
Cc: Vasily Khoruzhick <[email protected]>
Cc: Icenowy Zheng <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Boris Brezillon <[email protected]>
Cc: Hariprasad Kelam <[email protected]>
Cc: Alexios Zavras <[email protected]>
Cc: Brian Masney <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Allison Randal <[email protected]>
Cc: Shayenne Moura <[email protected]>
Cc: Abhinav Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
And use it in drivers accessing the bridge->next field directly.
This is part of our attempt to make the bridge chain a double-linked list
based on the generic list helpers.
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Change the prefix of bridge helpers targeting a bridge chain from
drm_bridge_ to drm_bridge_chain_ to better reflect the fact that
the operation will happen on all elements of chain, starting at the
bridge passed in argument.
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
The original logic is ok for primary display, but will not find out
component for external display.
For example, plane->index is 6 for external display, but there are only
2 layer nr in external display, and this condition will never happen:
if (plane->index < (count + mtk_ddp_comp_layer_nr(comp)))
Fix this by using the offset of the plane to mtk_crtc->planes as index,
instead of plane->index.
Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane")
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: Pi-Hsun Shih <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't
check for it. Add check for it.
Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane")
Signed-off-by: Pi-Hsun Shih <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Caused by file removal without adjusting the Makefile.
Fixes: d268f42e6856 ("drm/mediatek: don't open-code drm_gem_fb_create")
Cc: Daniel Vetter <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mihail Atanassov <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Aside: There's a few other fb_create implementations which
simply check for valid buffer format (or an approximation thereof),
and then call drm_gem_fb_create. For atomic drivers at least we could
walk all planes and make sure the format/modifier combo is valid,
and remove even more code.
For non-atomic drivers that's not possible, since the format list for
the primary buffer might be garbage (and most likely it is).
Also delete mtk_drm_fb.[hc] since it would now only contain one
function.
Acked-by: CK Hu <[email protected]>
Cc: CK Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/ <db323a3cdfd643cef65d796e959c16a14f105920.1564591626.git.andrzej.p@collabora.com
|
|
https://github.com/ckhu-mediatek/linux.git-tags into drm-next
Mediatek DRM next for Linux 5.5 - 2
Signed-off-by: Dave Airlie <[email protected]>
From: CK Hu <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/1573093419.13645.5.camel@mtksdaap41
|
|
Now that we support both reflections, we can expose 180 degree rotation
and rely on the simplify routine to convert that into REFLECT_X |
REFLECT_Y
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Add support for REFLECT_X rotations.
Cc: Fritz Koenig <[email protected]>
Cc: Daniele Castagna <[email protected]>
Cc: Miguel Casas <[email protected]>
Cc: Mark Yacoub <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Expose the rotation property and handle REFLECT_Y rotations.
Cc: Fritz Koenig <[email protected]>
Cc: Daniele Castagna <[email protected]>
Cc: Miguel Casas <[email protected]>
Cc: Mark Yacoub <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch adds the ability for components to expose supported rotations
which will be exposed to userspace via a plane rotation property.
No functional changes in this patch.
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This allows components to implement a .layer_check callback for their
layers which is called during atomic_check.
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Instead of hard-coding which components have planes, add a helper
function to walk the components and map a plane index to a component
layer.
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Add a couple of functions which enumerate the number of planes for a
component and initialize the planes for a component.
No functional changes in this patch, but it will allow us to selectively
support rotation if the component supports it.
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
These formats are handled in the rdma code, but for some reason they're
not published as supported formats for the planes. So add them to the
list.
Cc: Nicolas Boichat <[email protected]>
Cc: Daniele Castagna <[email protected]>
Cc: Miguel Casas <[email protected]>
Tested-by: Miguel Casas <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Remove unnecessary casts to pointer types passed to kfree.
Issue detected by coccinelle:
@@
type t1;
expression *e;
@@
-kfree((t1 *)e);
+kfree(e);
Signed-off-by: Wambui Karuga <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
|
|
https://github.com/ckhu-mediatek/linux.git-tags into drm-next
Mediatek DRM next for Linux 5.5
This include mipi_tx, dsi, and partial crtc for MT8183 SoC.
Signed-off-by: Dave Airlie <[email protected]>
From: CK Hu <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/1571103548.4416.6.camel@mtksdaap41
|
|
Mutex has no clock in some SoC, so add no_clk in private data and get
clock according to no_clk.
Signed-off-by: CK Hu <[email protected]>
|
|
mutex sof register offset will be private data of ddp
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
mutex sof will be ddp private data
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
mutex mod register offset will be private data of ddp.
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
except mutex mod, mutex mod reg,mutex sof reg,
and mutex sof id will be ddp private data
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add ovl0/ovl_2l0 usecase
in ovl->ovl_2l0 direct link usecase:
1. the crtc support layer number will 4+2
2. ovl_2l0 background color input select ovl0 when crtc init
and disable it when crtc finish
3. config ovl_2l0 layer, if crtc config layer number is
bigger than ovl0 support layers(max is 4)
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
distinguish ovl and ovl_2l by layer_nr when get comp
id
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add background color input select function for ovl/ovl_2l
ovl include 4 DRAM layer and 1 background color layer
ovl_2l include 4 DRAM layer and 1 background color layer
DRAM layer frame buffer data from render hardware, GPU for example.
backgournd color layer is embed in ovl/ovl_2l, we can only set
it color, but not support DRAM frame buffer.
for ovl0->ovl0_2l direct link usecase,
we need set ovl0_2l background color intput select from ovl0
if render send DRAM buffer layer number <=4, all these layer read
by ovl.
layer0 is at the bottom of all layers.
layer3 is at the top of all layers.
if render send DRAM buffer layer numbfer >=4 && <=6
ovl0 read layer0~3
ovl0_2l read layer4~5
layer5 is at the top ot all these layers.
the decision of how to setting ovl0/ovl0_2l read these layer data
is controlled in mtk crtc, which will be another patch
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
direct link
This patch add function to background color input select for ovl/ovl_2l
direct link for ovl/ovl_2l direct link usecase, we need set background
color input select for these hardware. This is preparation patch for
ovl/ovl_2l usecase.
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add layer_nr for ovl private data
ovl_2l almost same with with ovl hardware, except the
layer number for ovl_2l is 2 and ovl is 4.
this patch is a preparation for ovl-2l and
ovl share the same driver.
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add gmc_bits for ovl private data
GMC register was set RDMA ultra and pre-ultra threshold.
10bit GMC register define is different with other SOC, gmc_thrshd_l not
used.
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add component OVL_2L1
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add component OVL_2L0
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add component DITHER
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add ddp component CCORR
Signed-off-by: Yongqiang Niu <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Add dphy reset after setting lanes number to avoid dphy fifo effor.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
mtk_mipi_tx is the phy of mtk_dsi.
mtk_dsi get the phy(mtk_mipi_tx) in probe().
So, mtk_mipi_tx init should be ahead of mtk_dsi. Or mtk_dsi will
defer to wait mtk_mipi_tx probe done.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Change the method of frame rate calc which can get more accurate
frame rate.
data rate = pixel_clock * bit_per_pixel / lanes
Adjust hfp_wc to adapt the additional phy_data
if MIPI_DSI_MODE_VIDEO_BURST
hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12 - 6;
else
hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12;
Note:
//(2: 1 for sync, 1 for phy idle)
data_phy_cycles = T_hs_exit + T_lpx + T_hs_prepare + T_hs_zero + 2;
bpp: bit per pixel
Signed-off-by: Jitao Shi <[email protected]>
Tested-by: Ryan Case <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Add mt8183 dsi driver data. Enable size control and
reg commit control.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Our new DSI chip has frame size control.
So add the driver data to control for different chips.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
New DSI IP has shadow register and working reg. The register
values are writen to shadow register. And then trigger with
commit reg, the register values will be moved working register.
This function is default on. But this driver doesn't use this
function. So add the disable control.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
The writeb() is unavailable in mt8173. Because the mt8173 dsi module
doesn't support 8bit mode access.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Config the different CMDQ reg address in driver data.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
DSI panel driver need attach function which is include in
mipi_dsi_host_ops.
If mipi_dsi_host_register is not in probe, dsi panel will
probe more delay.
So move the mipi_dsi_host_register to probe from bind.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
This patch add mt8183 mipi_tx driver.
And also support other chips that use the same binding and driver.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|
|
Different IC has different mipi_tx setting of dsi.
This patch separates the mipi_tx hardware relate part for mt8173.
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: CK Hu <[email protected]>
|