aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm
AgeCommit message (Collapse)AuthorFilesLines
2021-02-24drm/atomic: Pass the full state to planes atomic_checkMaxime Ripard1-1/+3
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert all the remaining helpers to provide a consistent interface, starting with the planes atomic_check. The conversion was done using the coccinelle script below plus some manual changes for vmwgfx, built tested on all the drivers. @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... int (*atomic_check)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @ plane_atomic_func @ identifier helpers; identifier func; @@ static const struct drm_plane_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier dev; identifier plane, plane_state, state; @@ f(struct drm_device *dev, struct drm_atomic_state *state) { <+... - FUNCS->atomic_check(plane, plane_state) + FUNCS->atomic_check(plane, state) ...+> } @ ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { ... when != new_plane_state } @ adds_new_state depends on plane_atomic_func && !ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); ... } @ depends on plane_atomic_func @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *new_plane_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_new_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && adds_new_state @ @@ + #include <drm/drm_atomic.h> #include <drm/...> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2021-02-24drm: Rename plane atomic_check state namesMaxime Ripard1-10/+11
Most drivers call the argument to the plane atomic_check hook simply state, which is going to conflict with the global atomic state in a later rework. Let's rename it to new_plane_state (or new_state depending on the convention used in the driver). This was done using the coccinelle script below, and built tested: @ plane_atomic_func @ identifier helpers; identifier func; @@ static const struct drm_plane_helper_funcs helpers = { .atomic_check = func, }; @ has_old_state @ identifier plane_atomic_func.func; identifier plane; expression e; symbol old_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { ... struct drm_plane_state *old_state = e; ... } @ depends on has_old_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state + struct drm_plane_state *new_state ) { <+... - state + new_state ...+> } @ has_state @ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { ... } @ depends on has_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state + struct drm_plane_state *new_plane_state ) { <+... - state + new_plane_state ...+> } Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2021-02-23drm/omapdrm: Annotate dma-fence critical section in commit pathDaniel Vetter1-4/+5
Nothing special, just put the end right after hw_done(). Note that in one path there's a wait for the flip/update to complete. But as far as I understand from comments and code that's only relevant for modesets, and skipped if there wasn't a modeset done on a given crtc. For a bit more clarity pull the hw_done() call out of the if/else, that way it's a bit clearer flow. But happy to shuffle this around as is seen fit. Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2021-01-27drm/omap: dsi: fix unreachable code in dsi_vc_send_short()Menglong Dong1-3/+4
The 'r' in dsi_vc_send_short() is of type 'unsigned int', so the 'r < 0' can't be true. Fix this by introducing a 'err' of type 'int' insteaded. Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg") Signed-off-by: Menglong Dong <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: Delete useless kfree codeZheng Yongjun1-1/+0
The parameter of kfree function is NULL, so kfree code is useless, delete it. Signed-off-by: Zheng Yongjun <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: allow DSI commands to be sent earlyTomi Valkeinen2-5/+48
Panel drivers can send DSI commands in panel's prepare(), which happens before the bridge's enable() is called. The OMAP DSI driver currently only sets up the DSI interface at bridge's enable(), so prepare() cannot be used to send DSI commands. This patch fixes the issue by making it possible to enable the DSI interface any time a command is about to be sent. Disabling the interface is be done via delayed work. Clarifications for the delayed disable work and the panel doing DSI transactions: bridge_enable: If the disable callback is called just before bridge_enable takes the dsi_bus_lock, no problem, bridge_enable just enables the interface again. If the callback is ran just after bridge_enable's dsi_bus_unlock, no problem, dsi->video_enabled == true so the callback does nothing. bridge_disable: similar to bridge-enable, the callback won't do anything if video_enabled == true, and after bridge-disable has turned the video and the interface off, there's nothing to do for the callback. omap_dsi_host_detach: this is called when the panel does mipi_dsi_detach(), and we expect the panel to _not_ do any DSI transactions after (or during) mipi_dsi_detatch(), so there are no race conditions. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: fix DCS_CMD_ENABLETomi Valkeinen1-1/+2
We only need to set VC_CTRL:DCS_CMD_ENABLE for command mode panels when the HW has DSI_QUIRK_DCS_CMD_CONFIG_VC quirk. The old code did this right by accident, but now we set DCS_CMD_ENABLE for video mode panels too. Fix this by skipping the set for video mode. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: remove ulps supportTomi Valkeinen2-293/+8
ULPS is a niche power-saving feature which only really affects command mode panels showing a static picture. I know the ULPS code used to work very long time ago, but I could not get it working with the current driver. As the ULPS code is not trivial and includes delayed work (so lots of chances for race issues), and just keeping DSI video and command mode panels working has been challenging enough even without ULPS, lets remove ULPS support. When the DSI driver works reliably for command and video mode displays, someone interested can work on ULPS and add it back if the power saving is substantial enough. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: fix and cleanup ddr_clk_always_onTomi Valkeinen2-9/+5
The driver ignores MIPI_DSI_CLOCK_NON_CONTINUOUS, and always uses non-continuous clock. Fix this by using MIPI_DSI_CLOCK_NON_CONTINUOUS and at the same time, drop ddr_clk_always_on field which seems pretty useless. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: split video mode enable/disable into separate funcTomi Valkeinen1-44/+57
Clean up the code by separating video-mode enable/disable code into functions of their own. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: cleanup initial vc setupTomi Valkeinen1-54/+31
As we now have a fixed setup for VCs (VC0 for video stream, VC1 for commands), we can simplify the VC setup. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: rename dsi_display_* functionsTomi Valkeinen1-18/+18
The function names have evolved to be very confusing, and bunch of them have "display" in them even if the function doesn't deal with display as such (e.g. dsi_display_enable which just enables the DSI interface). Rename them by dropping the "display". Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: display_disable cleanupTomi Valkeinen1-16/+3
We can drop dsi_display_disable() which just calls _dsi_display_disable(), and rename _dsi_display_disable() to dsi_display_disable(). The WARN_ON(!dsi_bus_is_locked(dsi)) in dsi_display_disable is extra and can be dropped, as _dsi_display_disable() has the same WARN_ON(). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: display_enable cleanupTomi Valkeinen1-13/+3
We can drop dsi_display_enable(), which just calls _dsi_display_enable(), and rename _dsi_display_enable() to dsi_display_enable(). The WARN_ON(!dsi_bus_is_locked(dsi)) in dsi_display_enable is extra and can be dropped, as _dsi_display_enable() has the same WARN_ON(). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: move enable/disable to bridge enable/disableTomi Valkeinen1-33/+22
Clean up the code by inlining dsi_enable_video_outputs and dsi_disable_video_outputs functions. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: move structs & defines to dsi.hTomi Valkeinen3-447/+460
Move structs and defines to a private dsi.h header file to make dsi.c a bit easier to navigate. Also move the (now) private structs and defines from omapdss.h to dsi.h. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: use separate VCs for cmd and videoTomi Valkeinen1-5/+7
For command mode panels we can use a single VC for sending command and video data, even if we have to change the data source for that VC when going from command to video or vice versa. However, with video mode panels we want to keep the pixel data VC enabled, and use another VC for command data, and the commands will get interleaved into the pixel data. This patch makes the driver use VC0 for commands and VC1 for video. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: enable HS before sending the frameTomi Valkeinen1-0/+2
We currently use a single VC for sending commands and pixel data. The LP/HS mode for pixel data is correctly set to HS by accident, as we have set the VC to HS already earlier. However, if we use a different VC for video data, the VC is in LP mode. Fix this by always enabling HS mode before starting a frame update. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: skip dsi_vc_enable_hs when already in correct modeTomi Valkeinen1-6/+4
Simplify and optimize dsi_vc_enable_hs() so that it can be called without checking the current HS/LP mode. Make dsi_vc_enable_hs() return if the VC is already in the correct mode. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: untangle vc & channelTomi Valkeinen1-23/+22
DSI virtual channel and hardware VC blocks have gotten tangled as described in the previous commits. This has not caused any issues, as the value for both is 0, so it happens to work. To fix the issue, change the code to use the correct one of the two. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: pass vc and channel to various functionsTomi Valkeinen1-26/+28
To start fixing the issues related to channels and vcs described in the previous commit, pass vc and/or channel to various functions which will need it do properly handle different DSI channels and VCs. No functional changes. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: rename 'channel' to 'vc'Tomi Valkeinen1-110/+110
The "channel" usage in omap dsi driver is confusing. We have three different "channels": 1) DSI virtual channel ID. This is a number from 0 to 3, included in the packet payload. 2) VC. This is a register block in the DSI IP. There are four of those blocks. A VC is a DSI "pipeline", with defined fifo settings, data source (cpu or dispc), and some other settings. It has no relation to the 1). 3) dispc channel. It's the "pipeline" number dispc uses to send pixel data. The previous patch handled the third case. To start fixing 1) and 2), we first rename all uses of 'channel' to 'vc', as in most of the cases that is the correct thing to use. However, in some places 1) and 2) have gotten mixed up (i.e. the code uses msg->channel when it should use vc), which will be fixed in the following patch. Note that mixing 1) and 2) currently is "fine", as at the moment we only support DSI peripherals with DSI virtual channel 0, and we always use VC0 to send data. So both 1) and 2) are always 0. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: cleanup dispc channel usageTomi Valkeinen1-8/+8
The "channel" usage in omap dsi driver is confusing. As the first step, change "channel" to "dispc_channel" when dealing with the dispc channel. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: drop useless channel checksTomi Valkeinen1-11/+0
A DSI peripheral can have virtual channel ID of 0-3. This should be always the case, and there's no need in the driver to validate the channel. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: simplify VC handlingTomi Valkeinen1-36/+13
The VC handling has gotten quite tangled up. As the first step to clean it up, lets define that we only support a single DSI peripheral (which was really already the case), and we always use VC0 (define VC_DEFAULT 0) register block to send data to the peripheral. We can thus have a single mipi_dsi_device pointer and remove the for-loops which made passes over all the four VCs (just the first one was ever used). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: send nop instead of page & columnTomi Valkeinen1-29/+17
The OMAP DSI command mode panel driver used to send page & column address before each frame update, and this code was moved into the DSI host driver when converting it to the DRM bridge model. However, it's not really required to send the page & column address before each frame. It's also something that doesn't really belong to the DSI host driver, so we should drop the code. That said, frame updates break if we don't send _something_ between the frames. A NOP command does the trick. It is not clear if this behavior is as expected from a DSI command mode frame transfer, or is it a feature/issue with OMAP DSI driver, or a feature/issue in the command mode panel used. Most likely this is related to the following from the DSI spec: "To enable PHY synchronization the host processor should periodically end HS transmission and drive the Data Lanes to the LP state. This transition should take place at least once per frame." Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: set trans_mode according to client mode_flagsTomi Valkeinen1-0/+7
The DSI host driver currently ignores the video mode flags in client->mode_flags. Add the code to take the transfer mode from client's mode_flags. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: pll: fix iteration loop checkTomi Valkeinen1-0/+6
If the PLL calc function is given bad parameters, n_start/m_start may be higher than n_stop/m_stop, which leads to the loops iterating through the whole u32 number space. Fix this by failing early on such cases. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove dss_mgr_opsTomi Valkeinen6-87/+33
dss_mgr_ops was needed with the multi-module architecture, but is no longer needed. We can thus remove it and use direct calls. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove dispc_opsTomi Valkeinen9-200/+144
dispc_ops was created to help with the multi-module architecture and giving us the possibility of multiple dispc implementations. Neither of these is valid anymore, and we can remove dispc_ops and use direct calls to dispc. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: drop unused owner fieldTomi Valkeinen7-8/+0
dssdev->owner is set, but never used. We can drop the field. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove unused display.cTomi Valkeinen3-63/+1
The functions in display.c are not used, so drop the file. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: squash omapdrm sub-modules into oneTomi Valkeinen10-202/+155
At the moment we have three different modules: omapdss-base, omapdss, omapdrm. This setup is finally obsolete, as the last omapdrm specific panel has been converted to DRM panel. We can thus remove omapdss-base and omapdss, and just compile everything into omapdrm.ko. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: simplify pin configSebastian Reichel2-39/+13
Simplify DSI pin config, which always originates from DT nowadays. With the code being fully contained in the DSI encoder, we can drop the public structure. Since the function is no longer exposed, it now directly takes the private DSI data pointer. This drops a pointless conversion and means the pins can be configured earlier. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: simplify DSI manual update codeSebastian Reichel3-23/+9
Move dsi_ops into the main structure, since all other ops are gone. Instead of checking the device type we can simply check if dsi_ops are set. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: drop dssdev display fieldSebastian Reichel2-7/+1
All displays are now using a drm_panel or a drm_bridge that models the connector instead of dssdev, so this field is always 0 and can be dropped. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: drop DSS ops_flagsSebastian Reichel2-10/+0
The omapdss device's ops_flags field is no longer used and can be dropped. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: drop unused DSS next pointerSebastian Reichel4-18/+2
Since all encoders and panels are using the bridge API now, we next pointer is no longer useful and can be dropped. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: simplify omap_display_idSebastian Reichel1-8/+1
We no longer need to check for the DSS API, since all encoders, panels and connectors have been converted to the bridge API. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove unused omap_connectorSebastian Reichel6-190/+6
Remove unused code. Connectors are now created via drm_bridge_connector_init() and no longer OMAP specific. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove legacy DSS device operationsSebastian Reichel5-193/+0
All DSS devices have been converted to bridge API, so the device operations are always NULL. This removes the device ops function pointers and all code using it. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: Register a drm_bridgeSebastian Reichel1-45/+89
In order to integrate with a chain of drm_bridge, the internal DSI 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: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/panel: Move OMAP's DSI command mode panel driverSebastian Reichel5-651/+0
The panel driver is no longer using any OMAP specific APIs, so let's move it into the generic panel directory. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: remove global dss_device variableSebastian Reichel4-29/+9
We can simply provide the device to the omapdrm driver via pdata. omapdss_is_initialized() is no longer required (even before this patch), since omapdrm device is only registered after the pointer is initialized. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: panel-dsi-cm: fix remove()Sebastian Reichel1-3/+0
Do not try to reset the panel after DSI has been detached, since the DSI clocks may have been disabled at this point. The panel will be disabled and unprepared before being removed and a reset will be done when being probed again. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: panel-dsi-cm: support unbindingSebastian Reichel1-3/+2
Now, that the driver implements the common DRM panel API the unbind no longer needs to be suppressed. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: panel-dsi-cm: use DEVICE_ATTR_ROSebastian Reichel1-4/+4
Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: implement check timingsSebastian Reichel1-26/+44
Implement check timings, which will check if it's possible to configure the clocks for the provided mode using the same code as the set_config() hook. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: drop omapdss-boot-initSebastian Reichel3-234/+0
The table of compatible values needed to be prefixed with "omapdss," is empty, so all of this code is doing nothing now. Let's drop it. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-12-15drm/omap: dsi: convert to drm_panelSebastian Reichel4-158/+182
This converts the DSI module to expect common drm_panel display drivers instead of dssdev based ones. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]