- 17 9月, 2020 6 次提交
-
-
由 Yu Kuai 提交于
if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 8f83f268 ("drm/mediatek: Add HDMI support") Signed-off-by: NYu Kuai <yukuai3@huawei.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Yu Kuai 提交于
if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 119f5173 ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: NYu Kuai <yukuai3@huawei.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Yu Kuai 提交于
mtk_ddp_comp_init() is called in a loop in mtk_drm_probe(), if it fail, previous successive init component is not proccessed. Thus uninitialize valid component and put their device if component init failed. Fixes: 119f5173 ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: NYu Kuai <yukuai3@huawei.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Yu Kuai 提交于
if of_find_device_by_node() succeed, mtk_ddp_comp_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: d0afe37f ("drm/mediatek: support CMDQ interface in ddp component") Signed-off-by: NYu Kuai <yukuai3@huawei.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Chun-Kuang Hu 提交于
Even though cmdq client is created successfully, without the cmdq event, cmdq could not work correctly, so use CPU when fail to get cmdq event. Fixes: 60fa8c13 ("drm/mediatek: Move gce event property to mutex device node") Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Wang Hai 提交于
Remove mtk_drm_ddp.h which is included more than once Fixes: 9aef5867 ("drm/mediatek: drop use of drmP.h") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NWang Hai <wanghai38@huawei.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 27 8月, 2020 1 次提交
-
-
由 Jitao Shi 提交于
horizontal_backporch_byte should be hbp * bpp - hbp extra bytes. So remove the wrong subtraction 10. Fixes: 7a5bc4e2 ("drm/mediatek: change the dsi phytiming calculate method") Signed-off-by: NJitao Shi <jitao.shi@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 17 7月, 2020 1 次提交
-
-
由 Kuninori Morimoto 提交于
snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } For hdmi-codec, we need to update struct hdmi_codec_ops, and all its users in the same time. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/87d055xxj2.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 05 7月, 2020 9 次提交
-
-
由 Enric Balletbo i Serra 提交于
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. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
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: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
The mtk_dsi driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
Convert mtk_dsi to a bridge driver with built-in encoder support for compatibility with existing component drivers. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
This is really a cosmetic change just to make a bit more readable the code after convert the driver to drm_bridge. The bridge variable name will be used by the encoder drm_bridge, and the chained bridge will be named next_bridge. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
Equivalent information can be nowadays obtained using function tracer Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
There are some `static const u8` variables that are not used, this triggers a warning building with `make W=1`, it is safe to remove them, so do it and make the compiler more happy. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Matthias Brugger 提交于
The driver will be loaded by via a platform device. So we will need to get the device_node from the parent device. Depending on this we will set the driver data. As all this is done later already, just delete the call to of_device_get_match_data. Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com> Reviewed-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Bernard Zhao 提交于
In function mtk_dsi_clk_hs_state, remove unnecessary conversion to bool return, this change is to make the code a bit readable. Signed-off-by: NBernard Zhao <bernard@vivo.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 03 7月, 2020 1 次提交
-
-
由 Daniel Vetter 提交于
Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com> Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-4-daniel.vetter@ffwll.ch
-
- 27 6月, 2020 4 次提交
-
-
由 Hsin-Yi Wang 提交于
Disable the plane if it's not visible. Otherwise mtk_ovl_layer_config() would proceed with invalid plane and we may see vblank timeout. Fixes: 119f5173 ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 YueHaibing 提交于
WARNING: unmet direct dependencies detected for MTK_MMSYS Depends on [n]: (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && COMMON_CLK_MT8173_MMSYS [=n] Selected by [y]: - DRM_MEDIATEK [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_MEDIATEK [=y] || ARM && COMPILE_TEST [=n]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y] Make DRM_MEDIATEK depend on MTK_MMSYS to fix this. Fixes: 2c758e30 ("soc / drm: mediatek: Move routing control to mmsys device") Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Reviewed-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Enric Balletbo i Serra 提交于
Equivalent information can be nowadays obtained using function tracer. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Hsin-Yi Wang 提交于
drm device is now probed from mmsys. We need to use mmsys device to get gce nodes. Fix following errors: [ 0.740068] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) [ 0.748721] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) ... [ 2.659645] mediatek-drm mediatek-drm.1.auto: failed to request channel [ 2.666270] mediatek-drm mediatek-drm.1.auto: failed to request channel Fixes: 667c7692 ("soc / drm: mediatek: Fix mediatek-drm device probing") Signed-off-by: NHsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Tested-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 22 6月, 2020 1 次提交
-
-
由 Dennis YC Hsieh 提交于
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: NDennis YC Hsieh <dennis-yc.hsieh@mediatek.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://lore.kernel.org/r/1592749115-24158-9-git-send-email-dennis-yc.hsieh@mediatek.comSigned-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 27 5月, 2020 1 次提交
-
-
由 Ville Syrjälä 提交于
Get rid of mode->vrefresh and just calculate it on demand. Saves a bit of space and avoids the cached value getting out of sync with reality. Mostly done with cocci, with the following manual fixups: - Remove the now empty loop in drm_helper_probe_single_connector_modes() - Fix __MODE() macro in ch7006_mode.c - Fix DRM_MODE_ARG() macro in drm_modes.h - Remove leftover comment from samsung_s6d16d0_mode - Drop the TODO @@ @@ struct drm_display_mode { ... - int vrefresh; ... }; @@ identifier N; expression E; @@ struct drm_display_mode N = { - .vrefresh = E }; @@ identifier N; expression E; @@ struct drm_display_mode N[...] = { ..., { - .vrefresh = E } ,... }; @@ expression E; @@ { DRM_MODE(...), - .vrefresh = E, } @@ identifier M, R; @@ int drm_mode_vrefresh(const struct drm_display_mode *M) { ... - if (M->vrefresh > 0) - R = M->vrefresh; - else if (...) { ... } ... } @@ struct drm_display_mode *p; expression E; @@ ( - p->vrefresh = E; | - p->vrefresh + drm_mode_vrefresh(p) ) @@ struct drm_display_mode s; expression E; @@ ( - s.vrefresh = E; | - s.vrefresh + drm_mode_vrefresh(&s) ) @@ expression E; @@ - drm_mode_vrefresh(E) ? drm_mode_vrefresh(E) : drm_mode_vrefresh(E) + drm_mode_vrefresh(E) @find_substruct@ identifier X; identifier S; @@ struct X { ... struct drm_display_mode S; ... }; @@ identifier find_substruct.S; expression E; identifier I; @@ { .S = { - .vrefresh = E } } @@ identifier find_substruct.S; identifier find_substruct.X; expression E; identifier I; @@ struct X I[...] = { ..., .S = { - .vrefresh = E } ,... }; v2: Drop TODO v3: Rebase v4: Rebase Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Jernej Skrabec <jernej.skrabec@siol.net> Cc: Inki Dae <inki.dae@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Seung-Woo Kim <sw0312.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Jerry Han <hanxu5@huaqin.corp-partner.google.com> Cc: Icenowy Zheng <icenowy@aosc.io> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Stefan Mavrodiev <stefan@olimex.com> Cc: Robert Chiras <robert.chiras@nxp.com> Cc: "Guido Günther" <agx@sigxcpu.org> Cc: Purism Kernel Team <kernel@puri.sm> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: linux-amlogic@lists.infradead.org Cc: nouveau@lists.freedesktop.org Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NEmil Velikov <emil.velikov@collabora.com> Reviewed-by: NSam Ravnborg <sam@ravnborg.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-4-ville.syrjala@linux.intel.com
-
- 21 5月, 2020 3 次提交
-
-
由 Bernard Zhao 提交于
Eiminate the magic number in array size, there macro defines in hdmi.h. Signed-off-by: NBernard Zhao <bernard@vivo.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Bernard Zhao 提交于
This code change is to make code bit more readable. Signed-off-by: NBernard Zhao <bernard@vivo.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Anand K Mistry 提交于
If dma_map_sg() merges pages when creating the mapping, only the first entries will have a valid sg_dma_address() and sg_dma_len(), followed by entries with sg_dma_len() == 0. Signed-off-by: NAnand K Mistry <amistry@google.com> Signed-off-by: NAnand K Mistry <amistry@chromium.org> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 20 5月, 2020 1 次提交
-
-
由 Emil Velikov 提交于
Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Signed-off-by: NEmil Velikov <emil.velikov@collabora.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Acked-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-23-emil.l.velikov@gmail.com
-
- 22 4月, 2020 2 次提交
-
-
由 Jitao Shi 提交于
Read calibration data from nvmem, and config mipitx impedance with calibration data to make sure their impedance are 100ohm. Signed-off-by: NJitao Shi <jitao.shi@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
由 Jitao Shi 提交于
Add a property in device tree to control the driving by different board. Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NJitao Shi <jitao.shi@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 21 4月, 2020 1 次提交
-
-
由 Jitao Shi 提交于
Config dpi pins mode to output and pull low when dpi is disabled. Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). Signed-off-by: NJitao Shi <jitao.shi@mediatek.com> Signed-off-by: NChun-Kuang Hu <chunkuang.hu@kernel.org>
-
- 13 4月, 2020 3 次提交
-
-
由 Enric Balletbo i Serra 提交于
In the actual implementation the same compatible string "mediatek,<chip>-mmsys" is used to bind the clock drivers (drivers/soc/mediatek) as well as to the gpu driver (drivers/gpu/drm/mediatek/mtk_drm_drv.c). This ends with the problem that the only probed driver is the clock driver and there is no display at all. In any case having the same compatible string for two drivers is not correct and should be fixed. To fix this, and maintain backward compatibility, we can consider that the mmsys driver is the top-level entry point for the multimedia subsystem, so is not a pure clock controller but a system controller, and the drm driver is instantiated by that MMSYS driver. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Acked-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
由 Enric Balletbo i Serra 提交于
Provide a mtk_mmsys_ddp_connect() and mtk_mmsys_disconnect() functions to replace mtk_ddp_add_comp_to_path() and mtk_ddp_remove_comp_from_path(). Those functions will allow DRM driver and others to control the data path routing. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Acked-by: NCK Hu <ck.hu@mediatek.com> Tested-by: NAnders Roxell <anders.roxell@linaro.org> Reviewed-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
由 Matthias Brugger 提交于
It can happen that the mmsys clock drivers aren't probed before the platform driver gets invoked. The platform driver used to print a warning that the driver failed to get the clocks. Omit this error on the defered probe path. Signed-off-by: NMatthias Brugger <mbrugger@suse.com> Reviewed-by: NCK Hu <ck.hu@mediatek.com> Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 08 4月, 2020 1 次提交
-
-
由 Thomas Zimmermann 提交于
Remove the error check from the fbdev setup function. The function will print a warning. v2: * fix subject line Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de> Reviewed-by: NNoralf Trønnes <noralf@tronnes.org> Acked-by: NSam Ravnborg <sam@ravnborg.org> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-6-tzimmermann@suse.de
-
- 02 4月, 2020 1 次提交
-
-
由 Thomas Zimmermann 提交于
The mediatek driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Acked-by: NCK Hu <ck.hu@mediatek.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-11-tzimmermann@suse.de
-
- 26 3月, 2020 1 次提交
-
-
由 Daniel Vetter 提交于
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). v3: Use drmm_mode_config_init() for more clarity (Sam, Thomas) Acked-by: NChun-Kuang Hu <chunkuang.hu@kernel.org> Acked-by: NSam Ravnborg <sam@ravnborg.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-41-daniel.vetter@ffwll.ch
-
- 26 2月, 2020 2 次提交
-
-
由 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 components. For instance a pipeline with a bridge connected to the DDC signals to read EDID data, and another one connected to the HPD signal to detect connection and disconnection, will not be possible to support through this model. - It requires every bridge driver to implement similar connector handling code, resulting in code duplication. - It assumes that a bridge will either be wired to a connector or to another bridge, but doesn't support bridges that can be used in both positions very well (although there is some ad-hoc support for this in the analogix_dp bridge driver). In order to solve these issues, ownership of the connector should be moved to the display controller driver (where it can be implemented using helpers provided by the core). Extend the bridge API to allow disabling connector creation in bridge drivers as a first step towards the new model. The new flags argument to the bridge .attach() operation allows instructing the bridge driver to skip creating a connector. Unconditionally set the new flags argument to 0 for now to keep the existing behaviour, and modify all existing bridge drivers to return an error when connector creation is not requested as they don't support this feature yet. The change is based on the following semantic patch, with manual review and edits. @ rule1 @ identifier funcs; identifier fn; @@ struct drm_bridge_funcs funcs = { ..., .attach = fn }; @ depends on rule1 @ identifier rule1.fn; identifier bridge; statement S, S1; @@ int fn( struct drm_bridge *bridge + , enum drm_bridge_attach_flags flags ) { ... when != S + if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) { + DRM_ERROR("Fix bridge driver to make connector optional!"); + return -EINVAL; + } + S1 ... } @ depends on rule1 @ identifier rule1.fn; identifier bridge, flags; expression E1, E2, E3; @@ int fn( struct drm_bridge *bridge, enum drm_bridge_attach_flags flags ) { <... drm_bridge_attach(E1, E2, E3 + , flags ) ...> } @@ expression E1, E2, E3; @@ drm_bridge_attach(E1, E2, E3 + , 0 ) Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: NSebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-10-laurent.pinchart@ideasonboard.com
-
由 Jitao Shi 提交于
The factor depends on the divider of DPI in MT8183, therefore, we should fix this factor to the right and new one. Signed-off-by: NJitao Shi <jitao.shi@mediatek.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-
- 25 2月, 2020 1 次提交
-
-
由 Phong LE 提交于
The larb device remains NULL if the type is MTK_DISP_OVL_2L. A kernel panic is raised when a crtc uses mtk_smi_larb_get or mtk_smi_larb_put. Fixes: b17bdd0d ("drm/mediatek: add component OVL_2L0") Signed-off-by: NPhong LE <ple@baylibre.com> Signed-off-by: NCK Hu <ck.hu@mediatek.com>
-