[PATCH v6 27/84] drm/omap: dsi: untangle ulps ops from enable/disable

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Create a custom function pointer for ULPS and use it instead of reusing disable/enable functions for ULPS mode switch. This allows us to use the common disable/enable functions pointers for DSI. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen

[PATCH v6 70/84] drm/omap: dsi: use separate VCs for cmd and video

2020-12-15 Thread Tomi Valkeinen
, 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 Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 12 +++- 1 file changed, 7

[PATCH v6 20/84] drm/omap: dsi: drop useless sync()

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel The DSI sync() function only locks the bus and then releases it again. Currently the only invocation is directly before update(), which locks the bus anyways. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi

[PATCH v6 34/84] drm/omap: dsi: implement check timings

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel 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 Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c

[PATCH v6 42/84] drm/omap: remove unused omap_connector

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Remove unused code. Connectors are now created via drm_bridge_connector_init() and no longer OMAP specific. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/Makefile | 1 - drivers/gpu

[PATCH v6 64/84] drm/omap: dsi: cleanup dispc channel usage

2020-12-15 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/

[PATCH v6 59/84] drm/omap: dsi: set trans_mode according to client mode_flags

2020-12-15 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++

[PATCH v6 26/84] drm/omap: dsi: do bus locking in host driver

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This moves the bus locking into the host driver and unexports the custom API in preparation for drm_panel support. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 44 +-- drivers/gpu

[PATCH v6 50/84] drm/omap: squash omapdrm sub-modules into one

2020-12-15 Thread Tomi Valkeinen
ss_gather_components(struct device *dev) for_each_available_child_of_node(dev->of_node, child) omapdss_walk_device(dev, child, true); } -EXPORT_SYMBOL(omapdss_gather_components); static bool omapdss_component_is_loaded(struct omapdss_comp_node *comp) { @@ -315,8 +298,3 @@ bool

[PATCH v6 18/84] drm/omap: dsi: drop unused get_te()

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel The get_te() callback is not used, so we can drop the custom API. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 13 - drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - 2 files

[PATCH v6 23/84] drm/omap: dsi: lp/hs switching support for transfer()

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Integrate low-power / high-speed bus switching into transfer function and drop the omapdrm specific enable_hs() callback. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c

[PATCH v6 35/84] drm/omap: panel-dsi-cm: use DEVICE_ATTR_RO

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel 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 Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 8

[PATCH v6 56/84] drm/panel: panel-dsi-cm: cleanup tear enable

2020-12-15 Thread Tomi Valkeinen
Simplify the code by moving code from _dsicm_enable_te() into dsicm_power_on(). Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-dsi-cm.c | 23 --- 1 file changed, 4

[PATCH v6 43/84] drm/omap: simplify omap_display_id

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel 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 Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_drv.c | 9

[PATCH v6 37/84] drm/omap: panel-dsi-cm: fix remove()

2020-12-15 Thread Tomi Valkeinen
-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 3e46aa6d5ead..21df1997e7d1

[PATCH v6 48/84] drm/omap: dsi: simplify pin config

2020-12-15 Thread Tomi Valkeinen
pointless conversion and means the pins can be configured earlier. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 37 ++- drivers/gpu/drm/omapdrm/dss/omapdss.h | 15 --- 2 files

[PATCH v6 41/84] drm/omap: remove legacy DSS device operations

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel 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 Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers

[PATCH v6 52/84] drm/omap: drop unused owner field

2020-12-15 Thread Tomi Valkeinen
dssdev->owner is set, but never used. We can drop the field. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dpi.c | 1 - drivers/gpu/drm/omapdrm/dss/dsi.c | 1 - drivers/gpu/drm/omapdrm/dss/hdmi4.c

[PATCH v6 32/84] drm/omap: dsi: convert to drm_panel

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This converts the DSI module to expect common drm_panel display drivers instead of dssdev based ones. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 203 +++--- drivers/gpu/drm/omapdrm/dss

[PATCH v6 31/84] drm/omap: dsi: drop custom panel capability support

2020-12-15 Thread Tomi Valkeinen
ities. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 3 --- drivers/gpu/drm/omapdrm/dss/dsi.c | 8 drivers/gpu/drm/omapdrm/dss/omapdss.h | 8 +--- drivers/gp

[PATCH v6 29/84] drm/omap: dsi: move panel refresh function to host

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This moves the panel refresh/update function from the panel driver into the DSI host driver to prepare for common drm_panel support. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 68

[PATCH v6 25/84] drm/omap: dsi: drop custom enable_te() API

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Instead of using the custom enable_te() API, this automatically enables/disables TE core support when a matching packet is sent to the panel. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays

[PATCH v6 06/84] drm/omap: panel-dsi-cm: convert to transfer API

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This converts the panel-dsi-cm driver to use the transfer API instead of specific functions, so that the specific functions can be unexported and squashed into the generic transfer function. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Acked-by

[PATCH v6 19/84] drm/omap: dsi: drop unused enable_te()

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel enable_te() is not used, so the custom API can be dropped. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 39 --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 - 2 files changed

[PATCH v6 15/84] drm/omap: panel-dsi-cm: drop hardcoded VC

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Use dsi->channel everywhere, which originates from DT. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 20 +++ 1 file changed, 7 insertions(+),

[PATCH v6 10/84] drm/omap: dsi: simplify read functions

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Simplify the read related message handling by using the functionality provided by CONFIG_DRM_MIPI_DSI. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 110

[PATCH v6 12/84] drm/omap: dsi: introduce mipi_dsi_host

2020-12-15 Thread Tomi Valkeinen
: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 121 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 53 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 - 3 files changed, 102 insertions

[PATCH v6 13/84] drm/omap: panel-dsi-cm: use DSI helpers

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel After converting the driver to mipi_dsi_device we can use the generic message helpers to simplify the driver a lot. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 125

[PATCH v6 00/84] Convert DSI code to use drm_mipi_dsi and drm_panel

2020-12-15 Thread Tomi Valkeinen
map: dsi: simplify pin config ARM: omap2plus_defconfig: Update for moved DSI command mode panel Tomi Valkeinen (35): drm/omap: squash omapdrm sub-modules into one drm/omap: remove unused display.c drm/omap: drop unused owner field drm/omap: remove dispc_ops drm/omap: remove dss_mgr

[PATCH v6 02/84] drm/omap: drop unused dsi.configure_pins

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel The panel-dsi-cm's ddata->pin_config is always NULL, so this callback is never called. Instead the DSI encoder gets the pin configuration directly from DT. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- dri

[PATCH v6 05/84] drm/omap: dsi: add generic transfer function

2020-12-15 Thread Tomi Valkeinen
patches. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 54 +++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 ++ 2 files changed, 57 insertions(+) diff --git a/drivers/gpu/drm/omapdrm

[PATCH v6 09/84] drm/omap: dsi: simplify write function

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Simplify the write related messages handling by using the functionality provided by CONFIG_DRM_MIPI_DSI. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/Kconfig | 1 + drivers/gpu/drm

[PATCH v6 14/84] drm/omap: dsi: request VC via mipi_dsi_attach

2020-12-15 Thread Tomi Valkeinen
the latter will get dropped. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 24 +--- drivers/gpu/drm/omapdrm/dss/dsi.c | 61 --- drivers/gpu/drm/omapdrm/dss/omapdss.h

[PATCH v6 22/84] drm/omap: panel-dsi-cm: use bulk regulator API

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Use bulk regulator API to simplify the code. This also switches from _optional variant to normal variant, which will provide a dummy regulator (i.e. if some always-enabled regulator is not described in DT). Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen

[PATCH v6 11/84] drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Simplify the DSI encoder by using mipi_dsi_msg for dsi_vc_send_long and dsi_vc_send_short. Further improvements require cleaning up the channel allocation code first. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart

[PATCH v6 03/84] drm/omap: dsi: use MIPI_DSI_FMT_* instead of OMAP_DSS_DSI_FMT_*

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This replaces OMAP specific enum for pixel format with common implementation. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c

[PATCH v6 16/84] drm/omap: panel-dsi-cm: use common MIPI DCS 1.3 defines

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel Drop local definition of common MIPI DCS 1.3 defines. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[PATCH v6 08/84] drm/omap: dsi: drop virtual channel logic

2020-12-15 Thread Tomi Valkeinen
el, after which we can do that work with the proper APIs. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 11 ++--- drivers/gpu/drm/omapdrm/dss/dsi.c | 46 --- drivers/

[PATCH v6 04/84] drm/omap: constify write buffers

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel The write buffers are not modified, so they can be constant. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 24 drivers/gpu/drm/omapdrm/dss/omapdss.h

[PATCH v6 21/84] drm/omap: dsi: use pixel-format and mode from attach

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel In order to reduce the amount of custom functionality, this moves handling of pixel format and DSI mode from set_config() to dsi attach. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 -- drivers

[PATCH v6 07/84] drm/omap: dsi: unexport specific data transfer functions

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel After converting all DSI drivers, unexport the specific transfer functions. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 12 drivers/gpu/drm/omapdrm/dss/omapdss.h

[PATCH v6 24/84] drm/omap: dsi: move TE GPIO handling into core

2020-12-15 Thread Tomi Valkeinen
acquisition follows works in the same way as the exynos DSI implementation. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 104 + drivers/gpu/drm/omapdrm/dss/dsi.c | 145 -- 2 files changed

[PATCH v6 01/84] Revert "drm/omap: dss: Remove unused omap_dss_device operations"

2020-12-15 Thread Tomi Valkeinen
From: Sebastian Reichel This reverts commit e086558ae923 ("drm/omap: dss: Remove unused omap_dss_device operations") This is still needed by DSI. E.g. unloading modules without this will cause a crash. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-b

Re: [PATCH v5 29/29] drm/omap: dsi: allow DSI commands to be sent early

2020-12-15 Thread Tomi Valkeinen
Hi Sebastian, On 14/12/2020 19:17, Sebastian Reichel wrote: Hi, On Tue, Dec 08, 2020 at 02:28:55PM +0200, Tomi Valkeinen wrote: 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

Re: [PATCH v5 27/29] drm/omap: dsi: remove ulps support

2020-12-14 Thread Tomi Valkeinen
On 14/12/2020 19:39, Sebastian Reichel wrote: > Hi, > > On Tue, Dec 08, 2020 at 02:28:53PM +0200, Tomi Valkeinen wrote: >> ULPS doesn't work, and I have been unable to get it to work. As ULPS >> is a minor power-saving feature which requires substantial amount of >&g

Re: [PATCH v4 1/2] drm: automatic legacy gamma support

2020-12-14 Thread Tomi Valkeinen
On 11/12/2020 13:50, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Fri, Dec 11, 2020 at 01:42:36PM +0200, Tomi Valkeinen wrote: >> To support legacy gamma ioctls the drivers need to set >> drm_crtc_funcs.gamma_set either to a

[PATCH v4 1/2] drm: automatic legacy gamma support

2020-12-11 Thread Tomi Valkeinen
drm_atomic_helper_legacy_gamma_set() functionality into drm_color_mgmt.c to make drm_mode_gamma_set_ioctl() use drm_crtc_funcs.gamma_set if set or GAMMA_LUT property if not. Signed-off-by: Tomi Valkeinen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - .../gpu/drm/arm/display/komeda/komeda_crtc.c | 1

[PATCH v4 2/2] drm: add legacy support for using degamma for gamma

2020-12-11 Thread Tomi Valkeinen
MA_LUT when the latter is unavailable. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_color_mgmt.c | 22 ++ drivers/gpu/drm/drm_fb_helper.c | 5 + 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/d

[PATCH v4 0/2] drm: automatic legacy gamma support

2020-12-11 Thread Tomi Valkeinen
Hi, Yet another try. This time I don't touch the drm_fb_helper.c at all, except adding a FIXME comment. Now everything is inside drm_color_mgmt.c. Tomi Tomi Valkeinen (2): drm: automatic legacy gamma support drm: add legacy support for using degamma for gamma .../gpu/drm/amd/di

Re: [PATCH v2 2/2] drm: automatic legacy gamma support

2020-12-11 Thread Tomi Valkeinen
next-20201210] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch] > > url: > https://github.com/0day-ci/linux/commits/Tomi-V

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
On 10/12/2020 18:32, Ville Syrjälä wrote: >>> @@ -1053,18 +1052,9 @@ static int setcmap_atomic(struct fb_cmap *cmap, >>> struct fb_info *info) >>> goto out_state; >>> } >>> >>> - crtc_state = drm_atomic_get_crtc_state(state, crtc); >>> - if (I

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
On 10/12/2020 17:27, Daniel Vetter wrote: >> diff --git a/drivers/gpu/drm/drm_fb_helper.c >> b/drivers/gpu/drm/drm_fb_helper.c >> index e82db0f4e771..80e3797f0f01 100644 >> --- a/drivers/gpu/drm/drm_fb_helper.c >> +++ b/drivers/gpu/drm/drm_fb_helper.c >> @@ -46,6 +46,7 @@ >> #include >> #inclu

[PATCH v3 2/2] drm: add legacy support for using degamma for gamma

2020-12-10 Thread Tomi Valkeinen
MA_LUT when the latter is unavailable. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_color_mgmt.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c index c4e4d59c4432..8733d9d95b82

[PATCH v3 0/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
Hi, Another try. I dropped the has_gamma_prop and has_degamma_prop variables and use drm_mode_obj_find_prop_id() instead. I also changed the order of the patches, and added a new helper for setting the gamma ramp to the properties. Tomi Tomi Valkeinen (2): drm: automatic legacy gamma

[PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
functions as they are used from drm_fb_helper, but they are declared in drm_crtc_internal.h as they are not supposed to be used by the drivers. Signed-off-by: Tomi Valkeinen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - .../gpu/drm/arm/display/komeda/komeda_crtc.c | 1 - drivers/gpu/drm

Re: [PATCH v5 29/29] drm/omap: dsi: allow DSI commands to be sent early

2020-12-10 Thread Tomi Valkeinen
On 10/12/2020 09:34, Tomi Valkeinen wrote: > But we don't have anything stopping omap_dsi_host_transfer being called after > the whole bridge has > been detached (or called before attach). So, if we have a guarantee that the > panels won't be doing > dsi transfers befor

Re: [PATCH v5 29/29] drm/omap: dsi: allow DSI commands to be sent early

2020-12-10 Thread Tomi Valkeinen
On 08/12/2020 17:48, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Tue, Dec 08, 2020 at 02:28:55PM +0200, Tomi Valkeinen wrote: >> Panel drivers can send DSI commands in panel's prepare(), which happens >> before the bridge's en

Re: [PATCH] drm/tidss: Use the new api devm_drm_irq_install

2020-12-09 Thread Tomi Valkeinen
On 09/12/2020 14:08, Daniel Vetter wrote: > On Wed, Dec 9, 2020 at 1:06 PM Tomi Valkeinen wrote: >> >> On 09/12/2020 13:56, Daniel Vetter wrote: >>> On Wed, Dec 9, 2020 at 12:29 PM Tomi Valkeinen >>> wrote: >>>> >>>> On 09/12/2020 02:48,

Re: [PATCH] drm/tidss: Use the new api devm_drm_irq_install

2020-12-09 Thread Tomi Valkeinen
On 09/12/2020 13:56, Daniel Vetter wrote: > On Wed, Dec 9, 2020 at 12:29 PM Tomi Valkeinen wrote: >> >> On 09/12/2020 02:48, Daniel Vetter wrote: >>> On Tue, Dec 08, 2020 at 03:50:59PM +0800, Tian Tao wrote: >>>> Use devm_drm_irq_install to register interrup

Re: [PATCH] drm/tidss: Use the new api devm_drm_irq_install

2020-12-09 Thread Tomi Valkeinen
On 09/12/2020 02:48, Daniel Vetter wrote: > On Tue, Dec 08, 2020 at 03:50:59PM +0800, Tian Tao wrote: >> Use devm_drm_irq_install to register interrupts so that >> drm_irq_uninstall is not needed to be called. >> >> Signed-off-by: Tian Tao > > There's another drm_irq_install in the error path. Bu

Re: [PATCH v2 1/2] drm: add legacy support for using degamma for gamma

2020-12-09 Thread Tomi Valkeinen
Hi Daniel, On 09/12/2020 02:51, Daniel Vetter wrote: >>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h >>> index ba839e5e357d..4d9e217e5040 100644 >>> --- a/include/drm/drm_crtc.h >>> +++ b/include/drm/drm_crtc.h >>> @@ -1084,6 +1084,9 @@ struct drm_crtc { >>> */ >>> uint1

Re: [PATCH v5 11/29] drm/omap: dsi: pass vc to various functions

2020-12-08 Thread Tomi Valkeinen
On 08/12/2020 17:38, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Tue, Dec 08, 2020 at 02:28:37PM +0200, Tomi Valkeinen wrote: >> To start fixing the issues related to channels and vcs described in the >> previous commit, pass vc to various f

[PATCH v2 2/2] drm: automatic legacy gamma support

2020-12-08 Thread Tomi Valkeinen
: Tomi Valkeinen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - .../gpu/drm/arm/display/komeda/komeda_crtc.c | 1 - drivers/gpu/drm/arm/malidp_crtc.c | 1 - drivers/gpu/drm/armada/armada_crtc.c | 1 - drivers/gpu/drm/ast/ast_mode.c| 1

[PATCH v2 1/2] drm: add legacy support for using degamma for gamma

2020-12-08 Thread Tomi Valkeinen
but the legacy gamma-set ioctl does not work. This patch fixes the issue by changing drm_atomic_helper_legacy_gamma_set() so that GAMMA_LUT will be used if it exists, and DEGAMMA_LUT will be used as a fallback. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_atomic_helper.c | 15 +++

[PATCH v2 0/2] drm: fix and cleanup legacy gamma support

2020-12-08 Thread Tomi Valkeinen
RB. Ville has a WIP branch at git://github.com/vsyrjala/linux.git fb_helper_c8_lut_4 which does more extensive cleanups to the gamma handling. That work is slightly overlapping with this series, but afaics the concepts do not conflict as such (but the code changes do conflict). Tomi Tomi Valke

[PATCH v5 29/29] drm/omap: dsi: allow DSI commands to be sent early

2020-12-08 Thread Tomi Valkeinen
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. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c | 49 +++ drivers/gpu/drm/omapdrm/dss/dsi.h | 3 ++ 2 files changed

[PATCH v5 27/29] drm/omap: dsi: remove ulps support

2020-12-08 Thread Tomi Valkeinen
d and video mode displays, someone interested can add it back. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 297 +- drivers/gpu/drm/omapdrm/dss/dsi.h | 4 - 2 files changed, 8 insertions(+), 293 deletions(-) diff --

[PATCH v5 28/29] drm/omap: dsi: fix DCS_CMD_ENABLE

2020-12-08 Thread Tomi Valkeinen
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

[PATCH v5 22/29] drm/omap: dsi: display_disable cleanup

2020-12-08 Thread Tomi Valkeinen
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

[PATCH v5 25/29] drm/omap: dsi: split video mode enable/disable into separate func

2020-12-08 Thread Tomi Valkeinen
Clean up the code by separating video-mode enable/disable code into functions of their own. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 101 +- 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a

[PATCH v5 17/29] drm/panel: panel-dsi-cm: add panel database to driver

2020-12-08 Thread Tomi Valkeinen
Add a panel database to the driver instead of reading propertes from DT data. This is similar to panel-simple, and I believe it's more future safe way to handle the panels. Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/panel/panel-dsi-cm.c

[PATCH v5 18/29] drm/panel: panel-dsi-cm: drop unneeded includes

2020-12-08 Thread Tomi Valkeinen
Drop unneeded includes. Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/panel/panel-dsi-cm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c index

[PATCH v5 20/29] drm/omap: dsi: move enable/disable to bridge enable/disable

2020-12-08 Thread Tomi Valkeinen
Clean up the code by inlining dsi_enable_video_outputs and dsi_disable_video_outputs functions. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 55 +-- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git

[PATCH v5 15/29] drm/omap: dsi: use separate VCs for cmd and video

2020-12-08 Thread Tomi Valkeinen
, 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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions

[PATCH v5 26/29] drm/omap: dsi: fix and cleanup ddr_clk_always_on

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu

[PATCH v5 24/29] drm/omap: dsi: cleanup initial vc setup

2020-12-08 Thread Tomi Valkeinen
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 --- drivers/gpu/drm/omapdrm/dss/dsi.c | 85 +++ 1 file changed, 31 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v5 21/29] drm/omap: dsi: display_enable cleanup

2020-12-08 Thread Tomi Valkeinen
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

[PATCH v5 23/29] drm/omap: dsi: rename dsi_display_* functions

2020-12-08 Thread Tomi Valkeinen
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: To

[PATCH v5 16/29] drm/panel: panel-dsi-cm: remove extra 'if'

2020-12-08 Thread Tomi Valkeinen
We have a useless 'if' in the dsicm_bl_update_status(), a left over from the conversion to DRM model. Drop the if. Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/panel/panel-dsi-cm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) di

[PATCH v5 19/29] drm/omap: dsi: move structs & defines to dsi.h

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 384

[PATCH v5 14/29] drm/omap: dsi: enable HS before sending the frame

2020-12-08 Thread Tomi Valkeinen
starting a frame update. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 544f5f1eed91..9d210a020916 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c

[PATCH v5 12/29] drm/omap: dsi: untangle vc & channel

2020-12-08 Thread Tomi Valkeinen
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 --- drivers

[PATCH v5 01/29] drm/panel: panel-dsi-cm: cleanup tear enable

2020-12-08 Thread Tomi Valkeinen
Simplify the code by moving code from _dsicm_enable_te() into dsicm_power_on(). Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/panel/panel-dsi-cm.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff

[PATCH v5 09/29] drm/omap: dsi: cleanup dispc channel usage

2020-12-08 Thread Tomi Valkeinen
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 --- drivers/gpu/drm/omapdrm/dss/dsi.c | 16 1 file changed, 8 insertions(

[PATCH v5 08/29] drm/omap: dsi: drop useless channel checks

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 11 --- 1 file changed, 11 dele

[PATCH v5 13/29] drm/omap: dsi: skip dsi_vc_enable_hs when already in correct mode

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 10

[PATCH v5 11/29] drm/omap: dsi: pass vc to various functions

2020-12-08 Thread Tomi Valkeinen
To start fixing the issues related to channels and vcs described in the previous commit, pass vc to various functions which will need it do properly handle different DSI channels and VCs. No functional changes. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c | 54

[PATCH v5 10/29] drm/omap: dsi: rename 'channel' to 'vc'

2020-12-08 Thread Tomi Valkeinen
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 --- drivers/gpu/drm/omapdrm/dss/dsi.c | 220 +++--- 1 f

[PATCH v5 07/29] drm/omap: dsi: simplify VC handling

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 49 --- 1 file changed, 13 insertions(+), 36

[PATCH v5 02/29] ARM: dts: omap5: add address-cells & size-cells to dsi

2020-12-08 Thread Tomi Valkeinen
Add address-cells & size-cells to DSI nodes so that board files do not need to define them. Signed-off-by: Tomi Valkeinen Cc: Tony Lindgren Acked-by: Tony Lindgren --- arch/arm/boot/dts/omap5.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/omap5.dtsi b/

[PATCH v5 06/29] drm/omap: dsi: send nop instead of page & column

2020-12-08 Thread Tomi Valkeinen
LP state. This transition should take place at least once per frame." Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 46 --- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v5 04/29] drm/omap: dsi: set trans_mode according to client mode_flags

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++ 1 file changed, 7 in

[PATCH v5 00/29] Convert DSI code to use drm_mipi_dsi and drm_panel (second half)

2020-12-08 Thread Tomi Valkeinen
Also, the last patch is new in this version, although I did send it for v4 as 81/80. Other changes include minor clarifications and cleanups in the descriptions, and moving a few changes from one commit to another in case the change logically belongs to the other commit. Tomi Tomi Valkeinen (2

[PATCH v5 05/29] drm/panel: panel-dsi-cm: set column & page at setup

2020-12-08 Thread Tomi Valkeinen
Set the column & page address once during setup, instead of relying the DSI host driver to set those. Signed-off-by: Tomi Valkeinen Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/panel/panel-dsi-cm.c | 20 1 file changed, 20 insert

[PATCH v5 03/29] drm/omap: pll: fix iteration loop check

2020-12-08 Thread Tomi Valkeinen
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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm

Re: [PATCH v4 0/2] drm: add DisplayPort connector

2020-12-08 Thread Tomi Valkeinen
On 03/12/2020 23:24, Sam Ravnborg wrote: > Hi Tomi, > On Thu, Dec 03, 2020 at 01:52:21PM +0200, Tomi Valkeinen wrote: >> Hi DRM Bridge maintainers, >> >> On 30/11/2020 13:29, Tomi Valkeinen wrote: >>> Hi, >>> >>> This series adds the

Re: [PATCH 1/2] drm: add legacy support for using degamma for gamma

2020-12-07 Thread Tomi Valkeinen
On 07/12/2020 17:31, Ville Syrjälä wrote: > On Sat, Dec 05, 2020 at 12:35:25AM +0200, Laurent Pinchart wrote: >> Hi Tomi, >> >> Thank you for the patch. >> >> On Thu, Dec 03, 2020 at 01:48:44PM +0200, Tomi Valkeinen wrote: >>> We currently have drm_atomic_

Re: [PATCH v4 5/7] drm/tidss: Set bus_format correctly from bridge/connector

2020-12-04 Thread Tomi Valkeinen
On 04/12/2020 15:54, Boris Brezillon wrote: > On Fri, 4 Dec 2020 13:47:05 +0200 > Tomi Valkeinen wrote: > >> On 04/12/2020 13:12, Boris Brezillon wrote: >> >>>>> That'd be even better if you implement the bridge interface instead of >>>>>

Re: [PATCH v4 5/7] drm/tidss: Set bus_format correctly from bridge/connector

2020-12-04 Thread Tomi Valkeinen
On 04/12/2020 13:12, Boris Brezillon wrote: >>> That'd be even better if you implement the bridge interface instead of >>> the encoder one so we can get rid of the encoder_{helper}_funcs and use >>> drm_simple_encoder_init(). >> >> I'm a bit confused here. What should be the design here... >> >>

Re: [PATCH v4 5/7] drm/tidss: Set bus_format correctly from bridge/connector

2020-12-04 Thread Tomi Valkeinen
Hi Boris, On 04/12/2020 12:50, Boris Brezillon wrote: > On Tue, 1 Dec 2020 17:48:28 +0530 > Nikhil Devshatwar wrote: > >> Remove the old code to iterate over the bridge chain, as this is >> already done by the framework. >> The bridge state should have the negotiated bus format and flags. >> Use

<    3   4   5   6   7   8   9   10   11   12   >