Re: [PATCH v1 3/6] drm/mediatek: handle events when enabling/disabling crtc

2019-12-01 Thread CK Hu
Hi, Bibby:

On Thu, 2019-11-28 at 10:42 +0800, Bibby Hsieh wrote:
> The driver currently handles vblank events only when updating planes on
> an already enabled CRTC. The atomic update API however allows requesting
> an event when enabling or disabling a CRTC. This currently leads to
> event objects being leaked in the kernel and to events not being sent
> out. Fix it.

Reviewed-by: CK Hu 

> 
> Signed-off-by: Bibby Hsieh 
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c 
> b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index 71f4089a8117..cb87a538b8ff 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -334,6 +334,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc 
> *mtk_crtc)
>  static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc)
>  {
>   struct drm_device *drm = mtk_crtc->base.dev;
> + struct drm_crtc *crtc = _crtc->base;
>   int i;
>  
>   DRM_DEBUG_DRIVER("%s\n", __func__);
> @@ -357,6 +358,13 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc 
> *mtk_crtc)
>   mtk_disp_mutex_unprepare(mtk_crtc->mutex);
>  
>   pm_runtime_put(drm->dev);
> +
> + if (crtc->state->event && !crtc->state->active) {
> + spin_lock_irq(>dev->event_lock);
> + drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + crtc->state->event = NULL;
> + spin_unlock_irq(>dev->event_lock);
> + }
>  }
>  
>  static void mtk_crtc_ddp_config(struct drm_crtc *crtc)

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 2/6] drm/mediatek: use DRM core's atomic commit helper

2019-12-01 Thread CK Hu
Hi, Bibby:

On Thu, 2019-11-28 at 10:42 +0800, Bibby Hsieh wrote:
> The DRM core atomic helper now supports asynchronous commits natively.
> The custom drm implementation isn't needed anymore, remove it.

Reviewed-by: CK Hu 

Regards,
CK

> 
> Signed-off-by: Bibby Hsieh 
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 86 ++
>  drivers/gpu/drm/mediatek/mtk_drm_drv.h |  7 ---
>  2 files changed, 5 insertions(+), 88 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c 
> b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index 6588dc6dd5e3..16e5771d182e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -36,89 +36,14 @@
>  #define DRIVER_MAJOR 1
>  #define DRIVER_MINOR 0
>  
> -static void mtk_atomic_schedule(struct mtk_drm_private *private,
> - struct drm_atomic_state *state)
> -{
> - private->commit.state = state;
> - schedule_work(>commit.work);
> -}
> -
> -static void mtk_atomic_complete(struct mtk_drm_private *private,
> - struct drm_atomic_state *state)
> -{
> - struct drm_device *drm = private->drm;
> -
> - drm_atomic_helper_wait_for_fences(drm, state, false);
> -
> - /*
> -  * Mediatek drm supports runtime PM, so plane registers cannot be
> -  * written when their crtc is disabled.
> -  *
> -  * The comment for drm_atomic_helper_commit states:
> -  * For drivers supporting runtime PM the recommended sequence is
> -  *
> -  * drm_atomic_helper_commit_modeset_disables(dev, state);
> -  * drm_atomic_helper_commit_modeset_enables(dev, state);
> -  * drm_atomic_helper_commit_planes(dev, state,
> -  * DRM_PLANE_COMMIT_ACTIVE_ONLY);
> -  *
> -  * See the kerneldoc entries for these three functions for more details.
> -  */
> - drm_atomic_helper_commit_modeset_disables(drm, state);
> - drm_atomic_helper_commit_modeset_enables(drm, state);
> - drm_atomic_helper_commit_planes(drm, state,
> - DRM_PLANE_COMMIT_ACTIVE_ONLY);
> -
> - drm_atomic_helper_wait_for_vblanks(drm, state);
> -
> - drm_atomic_helper_cleanup_planes(drm, state);
> - drm_atomic_state_put(state);
> -}
> -
> -static void mtk_atomic_work(struct work_struct *work)
> -{
> - struct mtk_drm_private *private = container_of(work,
> - struct mtk_drm_private, commit.work);
> -
> - mtk_atomic_complete(private, private->commit.state);
> -}
> -
> -static int mtk_atomic_commit(struct drm_device *drm,
> -  struct drm_atomic_state *state,
> -  bool async)
> -{
> - struct mtk_drm_private *private = drm->dev_private;
> - int ret;
> -
> - ret = drm_atomic_helper_prepare_planes(drm, state);
> - if (ret)
> - return ret;
> -
> - mutex_lock(>commit.lock);
> - flush_work(>commit.work);
> -
> - ret = drm_atomic_helper_swap_state(state, true);
> - if (ret) {
> - mutex_unlock(>commit.lock);
> - drm_atomic_helper_cleanup_planes(drm, state);
> - return ret;
> - }
> -
> - drm_atomic_state_get(state);
> - if (async)
> - mtk_atomic_schedule(private, state);
> - else
> - mtk_atomic_complete(private, state);
> -
> - mutex_unlock(>commit.lock);
> -
> - return 0;
> -}
> +static const struct drm_mode_config_helper_funcs mtk_drm_mode_config_helpers 
> = {
> + .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
> +};
>  
>  static const struct drm_mode_config_funcs mtk_drm_mode_config_funcs = {
>   .fb_create = mtk_drm_mode_fb_create,
>   .atomic_check = drm_atomic_helper_check,
> - .atomic_commit = mtk_atomic_commit,
> + .atomic_commit = drm_atomic_helper_commit,
>  };
>  
>  static const enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = {
> @@ -265,6 +190,7 @@ static int mtk_drm_kms_init(struct drm_device *drm)
>   drm->mode_config.max_width = 4096;
>   drm->mode_config.max_height = 4096;
>   drm->mode_config.funcs = _drm_mode_config_funcs;
> + drm->mode_config.helper_private = _drm_mode_config_helpers;
>  
>   ret = component_bind_all(drm->dev, drm);
>   if (ret)
> @@ -540,8 +466,6 @@ static int mtk_drm_probe(struct platform_device *pdev)
>   if (!private)
>   return -ENOMEM;
>  
> - mutex_init(>commit.lock);
> - INIT_WORK(>commit.work, mtk_atomic_work);
>   private->data = of_device_get_match_data(dev);
>  
>   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h 
> b/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> index b6a82728d563..9f4ce60174f6 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> @@ -46,13 +46,6 @@ struct mtk_drm_private {
>   struct device_node 

Re: [01/30] drm: Introduce drm_bridge_init()

2019-12-01 Thread james qian wang (Arm Technology China)
On Tue, Nov 26, 2019 at 01:15:59PM +, Mihail Atanassov wrote:
> A simple convenience function to initialize the struct drm_bridge.
> 
> Signed-off-by: Mihail Atanassov 
> ---
>  drivers/gpu/drm/drm_bridge.c | 29 +
>  include/drm/drm_bridge.h |  4 
>  2 files changed, 33 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
> index cba537c99e43..cbe680aa6eac 100644
> --- a/drivers/gpu/drm/drm_bridge.c
> +++ b/drivers/gpu/drm/drm_bridge.c
> @@ -89,6 +89,35 @@ void drm_bridge_remove(struct drm_bridge *bridge)
>  }
>  EXPORT_SYMBOL(drm_bridge_remove);
>  
> +/**
> + * drm_bridge_init - initialise a drm_bridge structure
> + *
> + * @bridge: bridge control structure
> + * @funcs: control functions
> + * @dev: device
> + * @timings: timing specification for the bridge; optional (may be NULL)
> + * @driver_private: pointer to the bridge driver internal context (may be 
> NULL)
> + */
> +void drm_bridge_init(struct drm_bridge *bridge, struct device *dev,
> +  const struct drm_bridge_funcs *funcs,
> +  const struct drm_bridge_timings *timings,
> +  void *driver_private)
> +{
> + WARN_ON(!funcs);
> +
> + bridge->dev = NULL;
> + bridge->encoder = NULL;
> + bridge->next = NULL;
> +
> +#ifdef CONFIG_OF
> + bridge->of_node = dev->of_node;
> +#endif
> + bridge->timings = timings;
> + bridge->funcs = funcs;
> + bridge->driver_private = driver_private;

Can we directly put drm_bridge_add() here. then
- User always need to call bridge_init and add together.
- Consistent with others like drm_plane/crtc_init which directly has
  drm_mode_object_add() in it.

James.
> +}
> +EXPORT_SYMBOL(drm_bridge_init);
> +
>  /**
>   * drm_bridge_attach - attach the bridge to an encoder's chain
>   *
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index c0a2286a81e9..d6d9d5301551 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -402,6 +402,10 @@ struct drm_bridge {
>  
>  void drm_bridge_add(struct drm_bridge *bridge);
>  void drm_bridge_remove(struct drm_bridge *bridge);
> +void drm_bridge_init(struct drm_bridge *bridge, struct device *dev,
> +  const struct drm_bridge_funcs *funcs,
> +  const struct drm_bridge_timings *timings,
> +  void *driver_private);
>  struct drm_bridge *of_drm_find_bridge(struct device_node *np);
>  int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
> struct drm_bridge *previous);
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/mediatek: Fix can't get component for external display plane.

2019-12-01 Thread CK Hu
Hi, Pi-Hsun:


On Wed, 2019-11-27 at 18:04 +0800, Pi-Hsun Shih wrote:
> From: Yongqiang Niu 
> 
> 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.

Reviewed-by: CK Hu 

Regards,
CK

> 
> Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane")
> Signed-off-by: Yongqiang Niu 
> Signed-off-by: Pi-Hsun Shih 
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c 
> b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index f80a8ba75977..b34e7d70702a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -215,11 +215,12 @@ struct mtk_ddp_comp *mtk_drm_ddp_comp_for_plane(struct 
> drm_crtc *crtc,
>   struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
>   struct mtk_ddp_comp *comp;
>   int i, count = 0;
> + unsigned int local_index = plane - mtk_crtc->planes;
>  
>   for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
>   comp = mtk_crtc->ddp_comp[i];
> - if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) {
> - *local_layer = plane->index - count;
> + if (local_index < (count + mtk_ddp_comp_layer_nr(comp))) {
> + *local_layer = local_index - count;
>   return comp;
>   }
>   count += mtk_ddp_comp_layer_nr(comp);
> 
> base-commit: 1875ff320f14afe21731a6e4c7b46dd33e45dfaa

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()

2019-12-01 Thread Wayne Lin
[Why]
If the payload_state is DP_PAYLOAD_DELETE_LOCAL in series, current
code doesn't delete the payload at current index and just move the
index to next one after shuffling payloads.

[How]
After shuffling payloads, decide whether to move on index or not
according to payload_state of current payload.

Signed-off-by: Wayne Lin 
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c 
b/drivers/gpu/drm/drm_dp_mst_topology.c
index 81e92b260d7a..8da5d461ea01 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3176,7 +3176,8 @@ int drm_dp_update_payload_part1(struct 
drm_dp_mst_topology_mgr *mgr)
drm_dp_mst_topology_put_port(port);
}
 
-   for (i = 0; i < mgr->max_payloads; i++) {
+   for (i = 0; i < mgr->max_payloads;
+   (mgr->payloads[i].payload_state == DP_PAYLOAD_DELETE_LOCAL) ? i 
: i++) {
if (mgr->payloads[i].payload_state != DP_PAYLOAD_DELETE_LOCAL)
continue;
 
-- 
2.17.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/dp_mst: Remove VCPI while disabling topology mgr

2019-12-01 Thread Wayne Lin
[Why]
While disabling mst topology manager in
drm_dp_mst_topology_mgr_set_mst(), now just reset the mgr->payloads
but doesn't handle the mgr->proposed_vcpis.

[How]
Remove mgr->proposed_vcpis to NULL.

Signed-off-by: Wayne Lin 
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c 
b/drivers/gpu/drm/drm_dp_mst_topology.c
index ae5809a1f19a..81e92b260d7a 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3386,6 +3386,7 @@ static int drm_dp_get_vc_payload_bw(u8 dp_link_bw, u8  
dp_link_count)
 int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool 
mst_state)
 {
int ret = 0;
+   int i = 0;
struct drm_dp_mst_branch *mstb = NULL;
 
mutex_lock(>lock);
@@ -3446,10 +3447,21 @@ int drm_dp_mst_topology_mgr_set_mst(struct 
drm_dp_mst_topology_mgr *mgr, bool ms
/* this can fail if the device is gone */
drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0);
ret = 0;
+   mutex_lock(>payload_lock);
memset(mgr->payloads, 0, mgr->max_payloads * sizeof(struct 
drm_dp_payload));
mgr->payload_mask = 0;
set_bit(0, >payload_mask);
+   for (i = 0; i < mgr->max_payloads; i++) {
+   struct drm_dp_vcpi *tmp_vcpi = mgr->proposed_vcpis[i];
+
+   if (tmp_vcpi) {
+   tmp_vcpi->vcpi = 0;
+   tmp_vcpi->num_slots = 0;
+   }
+   mgr->proposed_vcpis[i] = NULL;
+   }
mgr->vcpi_mask = 0;
+   mutex_unlock(>payload_lock);
}
 
 out_unlock:
-- 
2.17.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

RE: [PATCH V2 1/2] drm/edid: Add aspect ratios to HDMI 4K modes

2019-12-01 Thread Lin, Wayne


> -Original Message-
> From: Ville Syrjälä 
> Sent: Friday, November 29, 2019 11:09 PM
> To: Lin, Wayne 
> Cc: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org
> Subject: Re: [PATCH V2 1/2] drm/edid: Add aspect ratios to HDMI 4K modes
> 
> On Mon, Nov 18, 2019 at 06:18:31PM +0800, Wayne Lin wrote:
> > [Why]
> > HDMI 2.0 adds aspect ratio attribute to distinguish different 4k
> > modes. According to Appendix E of HDMI 2.0 spec, source should use
> > VSIF to indicate video mode only when the mode is one defined in HDMI
> > 1.4b 4K modes. Otherwise, use AVI infoframes to convey VIC.
> >
> > Current code doesn't take aspect ratio into consideration while
> > constructing avi infoframe. Should modify that.
> >
> > [How]
> > Inherit Ville Syrjälä's work
> > "drm/edid: Prep for HDMI VIC aspect ratio" at
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> >
> hwork.kernel.org%2Fpatch%2F11174639%2Fdata=02%7C01%7CWayne.L
> in%40
> >
> amd.com%7C1fbbc9d617234af5f3d408d774de0a7c%7C3dd8961fe4884e608e1
> 1a82d9
> >
> 94e183d%7C0%7C0%7C637106369315352334sdata=QPW9CnwgPkl2DIn
> bymfaYT%
> > 2F6jxdmVaTMKEMN69VBFcQ%3Dreserved=0
> >
> > Add picture_aspect_ratio attributes to edid_4k_modes[] and construct
> > VIC and HDMI_VIC by taking aspect ratio into consideration.
> >
> > v2: Correct missing initializer error at adding aspect ratio of SMPTE
> > mode.
> >
> > Signed-off-by: Wayne Lin 
> 
> Our CI didn't complain about anything that looked relevant, so I went ahead an
> pushed these to drm-misc-next.
> 
> Thanks for the patches.

Many thanks for your time.
> 
> --
> Ville Syrjälä
> Intel

--
Regards,
Wayne Lin
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/bridge: analogix-anx6345: Avoid duplicate -supply suffix

2019-12-01 Thread Mark Brown
On Sat, Nov 30, 2019 at 04:09:58PM +0100, Torsten Duwe wrote:

> IMHO that commit message should have ended up somewhere under Documentation/.

This is documented already in the generic regulator bindings and
has been since they were added, they specify that supplies should
always have the suffix -supply.  The commit you reference was
part of the initial merge of the device tree support for the
regulator API.  Including the -supply suffix in the name used
internally in Linux would create problems for all other firmware
interfaces that map names differently.


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm: meson: venc: cvbs: fix CVBS mode matching

2019-12-01 Thread Martin Blumenstingl
Drop the picture_aspect_ratio from the drm_display_modes which are valid
for the Amlogic Meson CVBS encoder. meson_venc_cvbs_encoder_atomic_check
and meson_venc_cvbs_encoder_mode_set only support two very specific
drm_display_modes.

With commit 222ec1618c3ace ("drm: Add aspect ratio parsing in DRM
layer") the drm core started honoring the picture_aspect_ratio field
when comparing two drm_display_modes. Prior to that it was ignored.
When the CVBS encoder driver was initially submitted there was no aspect
ratio check.

This patch fixes "kmscube" and X.org output using the CVBS connector
with the Amlogic Meson VPU driver. Prior to this patch kmscube reported:
  failed to set mode: Invalid argument
Additionally it makes the CVBS mode checking behave identical to the
sun4i (drivers/gpu/drm/sun4i/sun4i_tv.c sun4i_tv_mode_to_drm_mode) and
ZTE (drivers/gpu/drm/zte/zx_tvenc.c tvenc_mode_{pal,ntsc}) which are
both not setting "picture_aspect_ratio" either.

Fixes: 222ec1618c3ace ("drm: Add aspect ratio parsing in DRM layer")
Fixes: bbbe775ec5b5da ("drm: Add support for Amlogic Meson Graphic Controller")
Signed-off-by: Martin Blumenstingl 
---
 drivers/gpu/drm/meson/meson_venc_cvbs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_venc_cvbs.c 
b/drivers/gpu/drm/meson/meson_venc_cvbs.c
index 9ab27aecfcf3..2ddcda8fa5b0 100644
--- a/drivers/gpu/drm/meson/meson_venc_cvbs.c
+++ b/drivers/gpu/drm/meson/meson_venc_cvbs.c
@@ -49,7 +49,6 @@ struct meson_cvbs_mode 
meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {
 720, 732, 795, 864, 0, 576, 580, 586, 625, 0,
 DRM_MODE_FLAG_INTERLACE),
.vrefresh = 50,
-   .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3,
},
},
{ /* NTSC */
@@ -59,7 +58,6 @@ struct meson_cvbs_mode 
meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {
720, 739, 801, 858, 0, 480, 488, 494, 525, 0,
DRM_MODE_FLAG_INTERLACE),
.vrefresh = 60,
-   .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3,
},
},
 };
-- 
2.24.0

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 4/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

2019-12-01 Thread Jyri Sarha
On 01/12/2019 16:18, Sam Ravnborg wrote:
> Hi Jyri
> 
> Thanks for the update.
> 
> On Sun, Dec 01, 2019 at 03:50:07PM +0200, Jyri Sarha wrote:
>> This patch adds a new DRM driver for Texas Instruments DSS IPs used on
>> Texas Instruments Keystone K2G, AM65x, and J721e SoCs. The new DSS IP is
>> a major change to the older DSS IP versions, which are supported by
>> the omapdrm driver. While on higher level the Keystone DSS resembles
>> the older DSS versions, the registers are completely different and the
>> internal pipelines differ a lot.
>>
>> DSS IP found on K2G is an "ultra-light" version, and has only a single
>> plane and a single output. The Keystone 3 DSS IPs are found on AM65x
>> and J721E SoCs. AM65x DSS has two video ports, one full video plane,
>> and another "lite" plane without scaling support. J721E has 4 video
>> ports, 2 video planes and 2 lite planes. AM65x DSS has also integrated
>> OLDI (LVDS) output.
> 
> Please include a short notice on the changes from v1 => v2.
> Preferably inside the changelog area so the changelog is preserved
> when the patch is committed.
> 

Sorry I forgot to add you to the recipients of the cover-letter that
contains the above info. It is attached to this mail. If requested, I
can also keep version history in the commit message itself.

BR,
Jyri

> See for example: a6c948f98239cbec1f5f0dc741b5841008c264ff
> (Just a random hit in "git log")
> 
>   Sam
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>From 43262a281a7461be3dd5859bacc8db9bca41e729 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Jyri Sarha 
Date: Sun, 1 Dec 2019 14:26:50 +0200
Subject: [PATCH v2 0/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

Changes since the first version of the patch series [2]:
- "drm/tidss: New driver for TI Keystone platform Display SubSystem"
 - rebased on top of drm-next-2019-11-27
 - sort all include lines in all files
 - remove all include 
 - remove select "select VIDEOMODE_HELPERS"
 - call dispc_vp_setup() later in tidss_crtc_atomic_flush() (there is no
   to call it in new modeset case as it is also called in vp_enable())
 - change probe sequence and drm_device allocation (follow example in drm_drv.c)
 - use __maybe_unused instead of #ifdef for pm functions
 - remove "struct drm_fbdev_cma *fbdev;" from driver data
 - check panel connector type before connecting it
- No change to binding or MAINTAINERS patches

There was couple of attempts upstream an earlier version of this
driver about a year ago [1]. Back then I needed to stop my efforts to
implement support for next Keystone DSS version, so now the driver
supports three different Keystone DSS version on three different SoCs.

I am starting the patch series versioning from the beginning because it
has been over a year since the previous patch set and the structure of
the driver has evolved quite a bit. However, all the earlier comments
should be addressed in this series.

[1] https://patchwork.freedesktop.org/series/44947/
[2] https://lists.freedesktop.org/archives/dri-devel/2019-November/246542.html

Jyri Sarha (5):
  dt-bindings: display: ti,k2g-dss: Add dt-schema yaml binding
  dt-bindings: display: ti,am65x-dss: Add dt-schema yaml binding
  dt-bindings: display: ti,j721e-dss: Add dt-schema yaml binding
  drm/tidss: New driver for TI Keystone platform Display SubSystem
  MAINTAINERS: add entry for tidss

 .../bindings/display/ti/ti,am65x-dss.yaml |  133 +
 .../bindings/display/ti/ti,j721e-dss.yaml |  177 ++
 .../bindings/display/ti/ti,k2g-dss.yaml   |   97 +
 MAINTAINERS   |   10 +
 drivers/gpu/drm/Kconfig   |2 +
 drivers/gpu/drm/Makefile  |1 +
 drivers/gpu/drm/tidss/Kconfig |   14 +
 drivers/gpu/drm/tidss/Makefile|   12 +
 drivers/gpu/drm/tidss/tidss_crtc.c|  376 +++
 drivers/gpu/drm/tidss/tidss_crtc.h|   46 +
 drivers/gpu/drm/tidss/tidss_dispc.c   | 2643 +
 drivers/gpu/drm/tidss/tidss_dispc.h   |  132 +
 drivers/gpu/drm/tidss/tidss_dispc_regs.h  |  243 ++
 drivers/gpu/drm/tidss/tidss_drv.c |  285 ++
 drivers/gpu/drm/tidss/tidss_drv.h |   40 +
 drivers/gpu/drm/tidss/tidss_encoder.c |   88 +
 drivers/gpu/drm/tidss/tidss_encoder.h |   17 +
 drivers/gpu/drm/tidss/tidss_irq.c |  185 ++
 drivers/gpu/drm/tidss/tidss_irq.h |   72 +
 drivers/gpu/drm/tidss/tidss_kms.c |  248 ++
 drivers/gpu/drm/tidss/tidss_kms.h |   15 +
 drivers/gpu/drm/tidss/tidss_plane.c   |  217 ++
 drivers/gpu/drm/tidss/tidss_plane.h   |   25 +
 drivers/gpu/drm/tidss/tidss_scale_coefs.c |  202 ++
 drivers/gpu/drm/tidss/tidss_scale_coefs.h |   22 +
 25 files changed, 5302 insertions(+)
 create mode 100644 

Re: [PATCH v2 4/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

2019-12-01 Thread Sam Ravnborg
Hi Jyri

Thanks for the update.

On Sun, Dec 01, 2019 at 03:50:07PM +0200, Jyri Sarha wrote:
> This patch adds a new DRM driver for Texas Instruments DSS IPs used on
> Texas Instruments Keystone K2G, AM65x, and J721e SoCs. The new DSS IP is
> a major change to the older DSS IP versions, which are supported by
> the omapdrm driver. While on higher level the Keystone DSS resembles
> the older DSS versions, the registers are completely different and the
> internal pipelines differ a lot.
> 
> DSS IP found on K2G is an "ultra-light" version, and has only a single
> plane and a single output. The Keystone 3 DSS IPs are found on AM65x
> and J721E SoCs. AM65x DSS has two video ports, one full video plane,
> and another "lite" plane without scaling support. J721E has 4 video
> ports, 2 video planes and 2 lite planes. AM65x DSS has also integrated
> OLDI (LVDS) output.

Please include a short notice on the changes from v1 => v2.
Preferably inside the changelog area so the changelog is preserved
when the patch is committed.

See for example: a6c948f98239cbec1f5f0dc741b5841008c264ff
(Just a random hit in "git log")

Sam

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2 5/5] MAINTAINERS: add entry for tidss

2019-12-01 Thread Jyri Sarha
Add entry for tidss DRM driver.

Signed-off-by: Jyri Sarha 
---
 MAINTAINERS | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 741e3f433f6e..dd7855e59bd1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5567,6 +5567,16 @@ F:   include/uapi/drm/v3d_drm.h
 F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
 T: git git://anongit.freedesktop.org/drm/drm-misc
 
+DRM DRIVERS FOR TI KEYSTONE
+M: Jyri Sarha 
+M: Tomi Valkeinen 
+L: dri-devel@lists.freedesktop.org
+S: Maintained
+F: drivers/gpu/drm/tidss/
+F: Documentation/devicetree/bindings/display/ti/ti,k2g-dss.txt
+F: Documentation/devicetree/bindings/display/ti/ti,am65x-dss.txt
+F: Documentation/devicetree/bindings/display/ti/ti,j721e-dss.txt
+
 DRM DRIVERS FOR VC4
 M: Eric Anholt 
 T: git git://github.com/anholt/linux
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2 3/5] dt-bindings: display: ti, j721e-dss: Add dt-schema yaml binding

2019-12-01 Thread Jyri Sarha
Add dt-schema yaml bindig for J721E DSS, J721E version TI Keystone
Display SubSystem.

Signed-off-by: Jyri Sarha 
---
 .../bindings/display/ti/ti,j721e-dss.yaml | 177 ++
 1 file changed, 177 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml

diff --git a/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml 
b/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
new file mode 100644
index ..cb3b64b9f04e
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
@@ -0,0 +1,177 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/display/ti/ti,j721e-dss.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: Texas Instruments J721E Display Subsystem
+
+maintainers:
+  - Jyri Sarha 
+  - Tomi Valkeinen 
+
+description: |
+  The J721E TI Keystone Display SubSystem with four output ports and
+  four video planes. There is two full video planes and two "lite
+  planes" without scaling support. The video ports can be connected to
+  the SoC's DPI pins or to integrated display bridges on the SoC.
+
+properties:
+  compatible:
+const: ti,j721e-dss
+
+  reg:
+maxItems: 17
+minItems: 17
+
+  reg-names:
+items:
+  - const: common_m
+  - const: common_s0
+  - const: common_s1
+  - const: common_s2
+  - const: vidl1
+  - const: vidl2
+  - const: vid1
+  - const: vid2
+  - const: ovr1
+  - const: ovr2
+  - const: ovr3
+  - const: ovr4
+  - const: vp1
+  - const: vp2
+  - const: vp3
+  - const: vp4
+  - const: wp
+
+  clocks:
+maxItems: 5
+minItems: 5
+
+  clock-names:
+items:
+  - const: fck
+  - const: vp1
+  - const: vp2
+  - const: vp3
+  - const: vp4
+
+  interrupts:
+maxItems: 4
+
+  interrupt-names:
+items:
+  - const: common_m
+  - const: common_s0
+  - const: common_s1
+  - const: common_s2
+
+  power-domains:
+maxItems: 1
+description: phandle to the associated power domain
+
+  port@0:
+type: object
+description:
+  The output port node form video port 1
+
+  port@1:
+type: object
+description:
+  The output port node from video port 2
+
+  port@2:
+type: object
+description:
+  The output port node from video port 3
+
+  port@3:
+type: object
+description:
+  The output port node from video port 4
+
+  max-memory-bandwidth:
+$ref: /schemas/types.yaml#/definitions/uint32
+description:
+  Input memory (from main memory to dispc) bandwidth limit in
+  bytes per second
+
+  "#address-cells":
+const: 1
+
+  "#size-cells":
+const: 0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - interrupts
+  - interrupt-names
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+dss: dss@04a0 {
+compatible = "ti,j721e-dss";
+reg =
+<0x00 0x04a0 0x00 0x1>, /* common_m */
+<0x00 0x04a1 0x00 0x1>, /* common_s0*/
+<0x00 0x04b0 0x00 0x1>, /* common_s1*/
+<0x00 0x04b1 0x00 0x1>, /* common_s2*/
+
+<0x00 0x04a2 0x00 0x1>, /* vidl1 */
+<0x00 0x04a3 0x00 0x1>, /* vidl2 */
+<0x00 0x04a5 0x00 0x1>, /* vid1 */
+<0x00 0x04a6 0x00 0x1>, /* vid2 */
+
+<0x00 0x04a7 0x00 0x1>, /* ovr1 */
+<0x00 0x04a9 0x00 0x1>, /* ovr2 */
+<0x00 0x04ab 0x00 0x1>, /* ovr3 */
+<0x00 0x04ad 0x00 0x1>, /* ovr4 */
+
+<0x00 0x04a8 0x00 0x1>, /* vp1 */
+<0x00 0x04aa 0x00 0x1>, /* vp2 */
+<0x00 0x04ac 0x00 0x1>, /* vp3 */
+<0x00 0x04ae 0x00 0x1>, /* vp4 */
+
+<0x00 0x04af 0x00 0x1>; /* wb */
+  reg-names = "common_m", "common_s0",
+"common_s1", "common_s2",
+"vidl1", "vidl2","vid1","vid2",
+"ovr1", "ovr2", "ovr3", "ovr4",
+"vp1", "vp2", "vp3", "vp4",
+"wb";
+
+clocks =<_clks 152 0>,
+<_clks 152 1>,
+<_clks 152 4>,
+<_clks 152 9>,
+<_clks 152 13>;
+clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
+
+interrupts = ,
+ ,
+

[PATCH v2 1/5] dt-bindings: display: ti, k2g-dss: Add dt-schema yaml binding

2019-12-01 Thread Jyri Sarha
Add dt-schema yaml bindig for K2G DSS, an ultra-light version of TI
Keystone Display SubSystem.

Signed-off-by: Jyri Sarha 
---
 .../bindings/display/ti/ti,k2g-dss.yaml   | 97 +++
 1 file changed, 97 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml

diff --git a/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml 
b/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
new file mode 100644
index ..2d92dea1c411
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/display/ti/ti,k2g-dss.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: Texas Instruments K2G Display Subsystem
+
+maintainers:
+  - Jyri Sarha 
+  - Tomi Valkeinen 
+
+description: |
+  The K2G DSS is an ultra-light version of TI Keystone Display
+  SubSystem. It has only one output port and video plane. The
+  output is DPI.
+
+properties:
+  compatible:
+const: ti,k2g-dss
+
+  reg:
+maxItems: 5
+minItems: 5
+
+  reg-names:
+items:
+  - const: cfg
+  - const: common
+  - const: vid1
+  - const: ovr1
+  - const: vp1
+
+  clocks:
+maxItems: 2
+minItems: 2
+
+  clock-names:
+items:
+  - const: fck
+  - const: vp1
+
+  interrupts:
+maxItems: 1
+
+  power-domains:
+maxItems: 1
+description: phandle to the associated power domain
+
+  port@0:
+type: object
+description:
+  The DSS DPI output port node
+
+  max-memory-bandwidth:
+$ref: /schemas/types.yaml#/definitions/uint32
+description:
+  Input memory (from main memory to dispc) bandwidth limit in
+  bytes per second
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - interrupts
+  - port@0
+
+additionalProperties: false
+
+examples:
+  - |
+dss: dss@0254 {
+compatible = "ti,k2g-dss";
+reg =   <0x0254 0x400>,
+<0x0255 0x1000>,
+<0x02557000 0x1000>,
+<0x0255a800 0x100>,
+<0x0255ac00 0x100>;
+reg-names = "cfg", "common", "vid1", "ovr1", "vp1";
+clocks =<_clks 0x2 0>,
+<_clks 0x2 1>;
+clock-names = "fck", "vp1";
+interrupts = ;
+
+power-domains = <_pds 0x2>;
+status = "disabled";
+
+max-memory-bandwidth = <23000>;
+port {
+dpi_out: endpoint {
+remote-endpoint = <_in>;
+};
+};
+};
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2 2/5] dt-bindings: display: ti, am65x-dss: Add dt-schema yaml binding

2019-12-01 Thread Jyri Sarha
Add dt-schema yaml bindig for AM65x DSS, AM65x version TI Keystone
Display SubSystem.

Signed-off-by: Jyri Sarha 
---
 .../bindings/display/ti/ti,am65x-dss.yaml | 133 ++
 1 file changed, 133 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml

diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml 
b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
new file mode 100644
index ..6691f5dad383
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
@@ -0,0 +1,133 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/display/ti/ti,am65x-dss.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: Texas Instruments AM65x Display Subsystem
+
+maintainers:
+  - Jyri Sarha 
+  - Tomi Valkeinen 
+
+description: |
+  The AM65x TI Keystone Display SubSystem with two output ports and
+  two video planes. The first video port supports OLDI and the second
+  supports DPI format. The fist plane is full video plane with all
+  features and the second is a "lite plane" without scaling support.
+
+properties:
+  compatible:
+const: ti,am65x-dss
+
+  reg:
+maxItems: 7
+minItems: 7
+
+  reg-names:
+items:
+  - const: common
+  - const: vidl1
+  - const: vid
+  - const: ovr1
+  - const: ovr2
+  - const: vp1
+  - const: vp2
+
+  clocks:
+maxItems: 3
+minItems: 3
+
+  clock-names:
+items:
+  - const: fck
+  - const: vp1
+  - const: vp2
+
+  interrupts:
+maxItems: 1
+
+  power-domains:
+maxItems: 1
+description: phandle to the associated power domain
+
+  port@0:
+type: object
+description:
+  The DSS OLDI output port node form video port 1
+
+  port@1:
+type: object
+description:
+  The DSS DPI output port node from video port 2
+
+  ti,am65x-oldi-io-ctrl:
+maxItems: 1
+description:
+  $ref: "/schemas/types.yaml#/definitions/phandle-array"
+  phandle to syscon device node mapping OLDI IO_CTRL registers.
+  The mapped range should point to OLDI_DAT0_IO_CTRL, map it and
+  following OLDI_DAT1_IO_CTRL, OLDI_DAT2_IO_CTRL, OLDI_DAT3_IO_CTRL,
+  and OLDI_CLK_IO_CTRL registers. This property is needed for OLDI
+  interface to work.
+
+  max-memory-bandwidth:
+$ref: /schemas/types.yaml#/definitions/uint32
+description:
+  Input memory (from main memory to dispc) bandwidth limit in
+  bytes per second
+
+  "#address-cells":
+const: 1
+
+  "#size-cells":
+const: 0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - interrupts
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+   dss: dss@04a0 {
+compatible = "ti,am65x-dss";
+reg =   <0x0 0x04a0 0x0 0x1000>, /* common */
+<0x0 0x04a02000 0x0 0x1000>, /* vidl1 */
+<0x0 0x04a06000 0x0 0x1000>, /* vid */
+<0x0 0x04a07000 0x0 0x1000>, /* ovr1 */
+<0x0 0x04a08000 0x0 0x1000>, /* ovr2 */
+<0x0 0x04a0a000 0x0 0x1000>, /* vp1 */
+<0x0 0x04a0b000 0x0 0x1000>; /* vp2 */
+reg-names = "common", "vidl1", "vid",
+"ovr1", "ovr2", "vp1", "vp2";
+
+ti,am65x-oldi-io-ctrl = <_oldi_io_ctrl>;
+
+power-domains = <_pds 67 TI_SCI_PD_EXCLUSIVE>;
+
+clocks =<_clks 67 1>,
+<_clks 216 1>,
+<_clks 67 2>;
+clock-names = "fck", "vp1", "vp2";
+
+interrupts = ;
+
+status = "disabled";
+
+port@0 {
+reg = <0>;
+
+oldi_out0: endpoint {
+remote-endpoint = <_in0>;
+};
+};
+};
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2 0/5] drm/tidss: New driver for TI Keystone platform Display SubSystem

2019-12-01 Thread Jyri Sarha
Changes since the first version of the patch series [2]:
- "drm/tidss: New driver for TI Keystone platform Display SubSystem"
 - rebased on top of drm-next-2019-11-27
 - sort all include lines in all files
 - remove all include 
 - remove select "select VIDEOMODE_HELPERS"
 - call dispc_vp_setup() later in tidss_crtc_atomic_flush() (there is no
   to call it in new modeset case as it is also called in vp_enable())
 - change probe sequence and drm_device allocation (follow example in drm_drv.c)
 - use __maybe_unused instead of #ifdef for pm functions
 - remove "struct drm_fbdev_cma *fbdev;" from driver data
 - check panel connector type before connecting it
- No change to binding or MAINTAINERS patches

There was couple of attempts upstream an earlier version of this
driver about a year ago [1]. Back then I needed to stop my efforts to
implement support for next Keystone DSS version, so now the driver
supports three different Keystone DSS version on three different SoCs.

I am starting the patch series versioning from the beginning because it
has been over a year since the previous patch set and the structure of
the driver has evolved quite a bit. However, all the earlier comments
should be addressed in this series.

[1] https://patchwork.freedesktop.org/series/44947/
[2] https://lists.freedesktop.org/archives/dri-devel/2019-November/246542.html

Jyri Sarha (5):
  dt-bindings: display: ti,k2g-dss: Add dt-schema yaml binding
  dt-bindings: display: ti,am65x-dss: Add dt-schema yaml binding
  dt-bindings: display: ti,j721e-dss: Add dt-schema yaml binding
  drm/tidss: New driver for TI Keystone platform Display SubSystem
  MAINTAINERS: add entry for tidss

 .../bindings/display/ti/ti,am65x-dss.yaml |  133 +
 .../bindings/display/ti/ti,j721e-dss.yaml |  177 ++
 .../bindings/display/ti/ti,k2g-dss.yaml   |   97 +
 MAINTAINERS   |   10 +
 drivers/gpu/drm/Kconfig   |2 +
 drivers/gpu/drm/Makefile  |1 +
 drivers/gpu/drm/tidss/Kconfig |   14 +
 drivers/gpu/drm/tidss/Makefile|   12 +
 drivers/gpu/drm/tidss/tidss_crtc.c|  376 +++
 drivers/gpu/drm/tidss/tidss_crtc.h|   46 +
 drivers/gpu/drm/tidss/tidss_dispc.c   | 2643 +
 drivers/gpu/drm/tidss/tidss_dispc.h   |  132 +
 drivers/gpu/drm/tidss/tidss_dispc_regs.h  |  243 ++
 drivers/gpu/drm/tidss/tidss_drv.c |  285 ++
 drivers/gpu/drm/tidss/tidss_drv.h |   40 +
 drivers/gpu/drm/tidss/tidss_encoder.c |   88 +
 drivers/gpu/drm/tidss/tidss_encoder.h |   17 +
 drivers/gpu/drm/tidss/tidss_irq.c |  185 ++
 drivers/gpu/drm/tidss/tidss_irq.h |   72 +
 drivers/gpu/drm/tidss/tidss_kms.c |  248 ++
 drivers/gpu/drm/tidss/tidss_kms.h |   15 +
 drivers/gpu/drm/tidss/tidss_plane.c   |  217 ++
 drivers/gpu/drm/tidss/tidss_plane.h   |   25 +
 drivers/gpu/drm/tidss/tidss_scale_coefs.c |  202 ++
 drivers/gpu/drm/tidss/tidss_scale_coefs.h |   22 +
 25 files changed, 5302 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
 create mode 100644 
Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
 create mode 100644 Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
 create mode 100644 drivers/gpu/drm/tidss/Kconfig
 create mode 100644 drivers/gpu/drm/tidss/Makefile
 create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_dispc.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_dispc.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_dispc_regs.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_drv.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_drv.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_irq.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_irq.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_kms.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_kms.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_plane.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_plane.h
 create mode 100644 drivers/gpu/drm/tidss/tidss_scale_coefs.c
 create mode 100644 drivers/gpu/drm/tidss/tidss_scale_coefs.h

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 09/16] drm/tegra: fix opencoded use of drm_panel_*

2019-12-01 Thread Sam Ravnborg
On Sun, Aug 04, 2019 at 10:16:30PM +0200, Sam Ravnborg wrote:
> Use the drm_panel_get_modes function.

Applied to drm-misc-next.

Sam
> 
> Signed-off-by: Sam Ravnborg 
> Cc: Thierry Reding 
> Cc: Jonathan Hunter 
> Cc: linux-te...@vger.kernel.org
> ---
>  drivers/gpu/drm/tegra/output.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
> index 274cb955e2e1..52b8396ec2dc 100644
> --- a/drivers/gpu/drm/tegra/output.c
> +++ b/drivers/gpu/drm/tegra/output.c
> @@ -23,7 +23,7 @@ int tegra_output_connector_get_modes(struct drm_connector 
> *connector)
>* ignore any other means of obtaining a mode.
>*/
>   if (output->panel) {
> - err = output->panel->funcs->get_modes(output->panel);
> + err = drm_panel_get_modes(output->panel);
>   if (err > 0)
>   return err;
>   }
> -- 
> 2.20.1
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 03/16] drm/exynos: fix opencoded use of drm_panel_*

2019-12-01 Thread Sam Ravnborg
On Sun, Aug 04, 2019 at 10:16:24PM +0200, Sam Ravnborg wrote:
> Call via drm_panel_get_modes().
> 

Applied to drm-misc-next.

Sam

> Signed-off-by: Sam Ravnborg 
> Cc: Inki Dae 
> Cc: Joonyoung Shim 
> Cc: Seung-Woo Kim 
> Cc: Kyungmin Park 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c 
> b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 6926cee91b36..36b02b456d9c 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1460,7 +1460,7 @@ static int exynos_dsi_get_modes(struct drm_connector 
> *connector)
>   struct exynos_dsi *dsi = connector_to_dsi(connector);
>  
>   if (dsi->panel)
> - return dsi->panel->funcs->get_modes(dsi->panel);
> + return drm_panel_get_modes(dsi->panel);
>  
>   return 0;
>  }
> -- 
> 2.20.1
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 06/16] drm/msm: fix opencoded use of drm_panel_*

2019-12-01 Thread Sam Ravnborg
On Sun, Aug 04, 2019 at 10:16:27PM +0200, Sam Ravnborg wrote:
> Use the function drm_panel_get_modes().
> 

Applied to drm-misc-next.

Sam

> Signed-off-by: Sam Ravnborg 
> Cc: Alexios Zavras 
> Cc: Thomas Gleixner 
> Cc: Allison Randal 
> Cc: Sam Ravnborg 
> Cc: Enrico Weigelt 
> ---
>  drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c 
> b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c
> index ecef4f5b9f26..0e21252fd1d6 100644
> --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c
> +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c
> @@ -55,7 +55,7 @@ static int mdp4_lvds_connector_get_modes(struct 
> drm_connector *connector)
>   if (panel) {
>   drm_panel_attach(panel, connector);
>  
> - ret = panel->funcs->get_modes(panel);
> + ret = drm_panel_get_modes(panel);
>  
>   drm_panel_detach(panel);
>   }
> -- 
> 2.20.1
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 02/16] drm/exynos: fix opencoded use of drm_panel_*

2019-12-01 Thread Sam Ravnborg
On Sun, Aug 04, 2019 at 10:16:23PM +0200, Sam Ravnborg wrote:
> drm_panel_attach() will check if there is a controller
> already attached - drop the check in the driver.
> 
> Use drm_panel_get_modes() so the driver no longer uses the function
> pointer.

Applied to drm-misc-next.

Sam

> 
> Signed-off-by: Sam Ravnborg 
> Cc: Inki Dae 
> Cc: Joonyoung Shim 
> Cc: Seung-Woo Kim 
> Cc: Kyungmin Park 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c 
> b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 3cebb19ec1c4..5479ff71cbc6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -43,7 +43,7 @@ exynos_dpi_detect(struct drm_connector *connector, bool 
> force)
>  {
>   struct exynos_dpi *ctx = connector_to_dpi(connector);
>  
> - if (ctx->panel && !ctx->panel->connector)
> + if (ctx->panel)
>   drm_panel_attach(ctx->panel, >connector);
>  
>   return connector_status_connected;
> @@ -85,7 +85,7 @@ static int exynos_dpi_get_modes(struct drm_connector 
> *connector)
>   }
>  
>   if (ctx->panel)
> - return ctx->panel->funcs->get_modes(ctx->panel);
> + return drm_panel_get_modes(ctx->panel);
>  
>   return 0;
>  }
> -- 
> 2.20.1
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/panel: clean up indentation issue

2019-12-01 Thread Sam Ravnborg
Hi Colin.

On Wed, Sep 25, 2019 at 01:03:57PM +0100, Colin King wrote:
> From: Colin Ian King 
> 
> There is a continue statement that is indented one level too deeply,
> remove the extraneous tab.
> 
> Signed-off-by: Colin Ian King 
> ---
>  drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c 
> b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> index 2bae1db3ff34..7dd67262a2ed 100644
> --- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> @@ -161,7 +161,7 @@ static int lcd_olinuxino_get_modes(struct drm_panel 
> *panel)
>   lcd_mode->hactive,
>   lcd_mode->vactive,
>   lcd_mode->refresh);
> - continue;
> + continue;
>   }
>  
>   mode->clock = lcd_mode->pixelclock;

Thanks, this is the kind of issues that can fool one or take
focus away when reading code.

Applied to drm-misc-next.

Sam
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel