All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay kumar <ajaynumb@gmail.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Sean Paul <seanpaul@google.com>,
	abrestic@chromium.org, sunil joshi <joshi@samsung.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	a.hajda@samsung.com, Kyungmin Park <kyungmin.park@samsung.com>,
	treding@nvidia.com, Prashanth G <prashanth.g@samsung.com>,
	Ajay Kumar <ajaykumar.rs@samsung.com>,
	Rahul Sharma <rahul.sharma@samsung.com>
Subject: Re: [PATCH 5/7] drm/exynos: dp: modify driver to support drm_panel
Date: Sat, 19 Apr 2014 01:22:48 +0530	[thread overview]
Message-ID: <CAEC9eQN_0nmqNCSi8XOi7bd1ZjC=hvuRtEv8xh-D-_ECpMv53Q@mail.gmail.com> (raw)
In-Reply-To: <000401cf5ae5$bbea0340$33be09c0$%han@samsung.com>


[-- Attachment #1.1: Type: text/plain, Size: 4696 bytes --]

Hi Jingoo,


On Fri, Apr 18, 2014 at 2:38 PM, Jingoo Han <jg1.han@samsung.com> wrote:

> On Wednesday, April 16, 2014 11:33 PM, Ajay Kumar wrote:
> >
> > This patch attaches the dp connector to exynos_dp_panel, and adds
> > calls to drm_panel functions to control panel power sequence.
> >
> > Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> > ---
> >  drivers/gpu/drm/exynos/Kconfig          |  1 +
> >  drivers/gpu/drm/exynos/exynos_dp_core.c | 19 +++++++++++++++++++
> >  drivers/gpu/drm/exynos/exynos_dp_core.h |  1 +
> >  3 files changed, 21 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/exynos/Kconfig
> b/drivers/gpu/drm/exynos/Kconfig
> > index 5bf5bca..56af433 100644
> > --- a/drivers/gpu/drm/exynos/Kconfig
> > +++ b/drivers/gpu/drm/exynos/Kconfig
> > @@ -52,6 +52,7 @@ config DRM_EXYNOS_DP
> >       bool "EXYNOS DRM DP driver support"
> >       depends on DRM_EXYNOS && ARCH_EXYNOS
> >       default DRM_EXYNOS
> > +     select DRM_PANEL
> >       help
> >         This enables support for DP device.
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c
> b/drivers/gpu/drm/exynos/exynos_dp_core.c
> > index 18fd9c5..6beeab6 100644
> > --- a/drivers/gpu/drm/exynos/exynos_dp_core.c
> > +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c
> > @@ -28,6 +28,7 @@
> >  #include <drm/drmP.h>
> >  #include <drm/drm_crtc.h>
> >  #include <drm/drm_crtc_helper.h>
> > +#include <drm/drm_panel.h>
> >  #include <drm/bridge/ptn3460.h>
> >
> >  #include "exynos_drm_drv.h"
> > @@ -1028,6 +1029,9 @@ static int exynos_dp_create_connector(struct
> exynos_drm_display *display,
> >       drm_sysfs_connector_add(connector);
> >       drm_mode_connector_attach_encoder(connector, encoder);
> >
> > +     if (dp->drm_panel)
> > +             drm_panel_attach(dp->drm_panel, &dp->connector);
> > +
> >       return 0;
> >  }
> >
> > @@ -1062,10 +1066,12 @@ static void exynos_dp_poweron(struct
> exynos_dp_device *dp)
> >       if (dp->dpms_mode == DRM_MODE_DPMS_ON)
> >               return;
> >
> > +     drm_panel_pre_enable(dp->drm_panel);
> >       clk_prepare_enable(dp->clock);
> >       exynos_dp_phy_init(dp);
> >       exynos_dp_init_dp(dp);
> >       enable_irq(dp->irq);
> > +     drm_panel_enable(dp->drm_panel);
> >  }
> >
> >  static void exynos_dp_poweroff(struct exynos_dp_device *dp)
> > @@ -1073,6 +1079,7 @@ static void exynos_dp_poweroff(struct
> exynos_dp_device *dp)
> >       if (dp->dpms_mode != DRM_MODE_DPMS_ON)
> >               return;
> >
> > +     drm_panel_disable(dp->drm_panel);
> >       disable_irq(dp->irq);
> >       flush_work(&dp->hotplug_work);
> >       exynos_dp_phy_exit(dp);
> > @@ -1225,6 +1232,7 @@ static int exynos_dp_dt_parse_panel(struct
> exynos_dp_device *dp)
> >  static int exynos_dp_bind(struct device *dev, struct device *master,
> void *data)
> >  {
> >       struct platform_device *pdev = to_platform_device(dev);
> > +     struct device_node *panel_node;
> >       struct drm_device *drm_dev = data;
> >       struct resource *res;
> >       struct exynos_dp_device *dp;
> > @@ -1299,6 +1307,17 @@ static int exynos_dp_bind(struct device *dev,
> struct device *master, void *data)
> >
> >       INIT_WORK(&dp->hotplug_work, exynos_dp_hotplug);
> >
> > +     panel_node = of_find_compatible_node(NULL, NULL,
> > +                                             "samsung,exynos-dp-panel");
> > +     if (panel_node) {
> > +             dp->drm_panel = of_drm_find_panel(panel_node);
> > +             if (!dp->drm_panel) {
> > +                     of_node_put(panel_node);
> > +                     return -ENODEV;
> > +             }
> > +             of_node_put(panel_node);
> > +     }
>
> The following is simpler.
>
> +       if (panel_node) {
> +               dp->drm_panel = of_drm_find_panel(panel_node);
> +               of_node_put(panel_node);
> +               if (!dp->drm_panel)
> +                       return -ENODEV;
> +       }
>
Right, will change it.


> Best regards,
> Jingoo Han
>
> > +
> >       exynos_dp_phy_init(dp);
> >
> >       exynos_dp_init_dp(dp);
> > diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.h
> b/drivers/gpu/drm/exynos/exynos_dp_core.h
> > index 56fa43e..9dc7991 100644
> > --- a/drivers/gpu/drm/exynos/exynos_dp_core.h
> > +++ b/drivers/gpu/drm/exynos/exynos_dp_core.h
> > @@ -148,6 +148,7 @@ struct exynos_dp_device {
> >       struct drm_device       *drm_dev;
> >       struct drm_connector    connector;
> >       struct drm_encoder      *encoder;
> > +     struct drm_panel        *drm_panel;
> >       struct clk              *clock;
> >       unsigned int            irq;
> >       void __iomem            *reg_base;
> > --
> > 1.8.1.2
>
>
Thanks and regards,
Ajay Kumar

[-- Attachment #1.2: Type: text/html, Size: 6446 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-04-18 19:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 14:32 [PATCH 0/7] drm: exynos: few patches to enhance bridge chip support Ajay Kumar
2014-04-16 14:33 ` [PATCH 1/7] drm/exynos: dp: support hotplug detection via GPIO Ajay Kumar
2014-04-18  8:23   ` Jingoo Han
2014-04-18 19:33     ` Ajay kumar
2014-04-16 14:33 ` [PATCH 2/7] drm/panel: add pre_enable routine to drm panel Ajay Kumar
2014-04-16 14:33 ` [PATCH 3/7] drm/panel: Add driver for exynos_dp based panels Ajay Kumar
2014-04-18  8:47   ` Jingoo Han
2014-04-18 19:42     ` Ajay kumar
2014-04-21  0:34       ` Jingoo Han
2014-04-16 14:33 ` [PATCH 4/7] drm/exynos: add exynos_dp_panel driver registration to drm driver Ajay Kumar
2014-04-18  8:57   ` Jingoo Han
2014-04-18 19:50     ` Ajay kumar
2014-04-21  0:29       ` Jingoo Han
2014-04-16 14:33 ` [PATCH 5/7] drm/exynos: dp: modify driver to support drm_panel Ajay Kumar
2014-04-18  9:08   ` Jingoo Han
2014-04-18 19:52     ` Ajay kumar [this message]
2014-04-16 14:33 ` [PATCH 6/7] drm/bridge: ptn3460: enable polling based detection Ajay Kumar
2014-04-16 14:33 ` [PATCH 7/7] drm/bridge: ptn3460: add drm_panel controls Ajay Kumar
2014-04-18  9:25   ` Jingoo Han
2014-04-18 19:55     ` Ajay kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEC9eQN_0nmqNCSi8XOi7bd1ZjC=hvuRtEv8xh-D-_ECpMv53Q@mail.gmail.com' \
    --to=ajaynumb@gmail.com \
    --cc=a.hajda@samsung.com \
    --cc=abrestic@chromium.org \
    --cc=ajaykumar.rs@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jg1.han@samsung.com \
    --cc=joshi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prashanth.g@samsung.com \
    --cc=rahul.sharma@samsung.com \
    --cc=seanpaul@google.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.