public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "K, Mythri P" <mythripk@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH v3 09/10] OMAP4: DSS2: HDMI: Function pointer approach to call
Date: Tue, 06 Sep 2011 15:45:26 +0300	[thread overview]
Message-ID: <1315313126.16126.3.camel@deskari> (raw)
In-Reply-To: <CAP5A+B__VLN4Vr3v3Q7GXdKoxicTFOFQaTs8-UnoVC+XXRTETA@mail.gmail.com>

On Mon, 2011-09-05 at 23:03 +0530, K, Mythri P wrote:
> Hi,
> 
> On Mon, Sep 5, 2011 at 4:31 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Fri, 2011-09-02 at 16:17 +0530, mythripk@ti.com wrote:
> >> From: Mythri P K <mythripk@ti.com>
> >>
> >> To make the current hdmi DSS driver compatible with future OMAP having
> >> different IP blocks( A combination of different core, PHY, PLL blocks),
> >> Add HDMI hdmi functions as a function pointer in dss_features to abstract
> >> hdmi dss driver IP agnostic, hdmi dss driver  which will now access
> >> generic functions irrespective of underlying IP.
> >>

<snip>

> >> diff --git a/include/video/omapdss.h b/include/video/omapdss.h
> >> index 9398dd3..c8891d1 100644
> >> --- a/include/video/omapdss.h
> >> +++ b/include/video/omapdss.h
> >> @@ -21,6 +21,9 @@
> >>  #include <linux/list.h>
> >>  #include <linux/kobject.h>
> >>  #include <linux/device.h>
> >> +#if defined(CONFIG_OMAP4_DSS_HDMI)
> >> +#include <video/ti_hdmi.h>
> >> +#endif
> >>
> >>  #define DISPC_IRQ_FRAMEDONE          (1 << 0)
> >>  #define DISPC_IRQ_VSYNC                      (1 << 1)
> >> @@ -555,6 +558,26 @@ struct omap_dss_driver {
> >>       u32 (*get_wss)(struct omap_dss_device *dssdev);
> >>  };
> >>
> >> +#if defined(CONFIG_OMAP4_DSS_HDMI)
> >> +struct omap_hdmi_ip_ops {
> >> +
> >> +     void (*video_configure)(struct hdmi_ip_data *ip_data);
> >> +
> >> +     int (*phy_enable)(struct hdmi_ip_data *ip_data);
> >> +
> >> +     void (*phy_disable)(struct hdmi_ip_data *ip_data);
> >> +
> >> +     int (*read_edid)(struct hdmi_ip_data *ip_data,
> >> +                     u8 *pedid, u16 max_length);
> >> +
> >> +     int (*pll_enable)(struct hdmi_ip_data *ip_data);
> >> +
> >> +     void (*pll_disable)(struct hdmi_ip_data *ip_data);
> >> +
> >> +     void (*video_enable)(struct hdmi_ip_data *ip_data, bool start);
> >> +};
> >> +#endif
> >> +
> >
> > Hmm, I don't think omapdss.h is the right place for this struct.
> >
> > You've made it omap specific, but similar struct will be needed by other
> > platforms also, right? So would it better be in ti_hdmi.h, and perhaps
> > called ti_hdmi_ip_ops?
> >
> > And actually, ti_hdmi.h contains struct hdmi_ip_data, which contains
> > pointer to struct omap_hdmi_ip_ops, so it's clear something is wrong
> > there.
> >
> > So either the omap_hdmi_ip_ops should be omapdss internal struct, and it
> > shouldn't be in struct hdmi_ip_data, or the ops struct should be generic
> > one in ti_hdmi.h.
> >
> > Did you consider how the code would look if the function pointers were
> > just included into struct hdmi_ip_data, without any ops struct at all?
> >
> I guess moving it to ti_hdmi.h is a good option.. but i would think
> wrapping it in a struct
> would look cleaner ?

You didn't make this change for the v4?

 Tomi



  parent reply	other threads:[~2011-09-06 12:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 10:47 [PATCH v3 00/10]HDMI: Split hdmi.c in DSS to seperate OMAP dependent mythripk
2011-09-02 10:47 ` [PATCH v3 01/10] OMAP4: DSS: HDMI: HDMI clean up to pass base_address mythripk
2011-09-02 10:47   ` [PATCH v3 02/10] OMAP4: DSS: HDMI: Move pll and video configuration mythripk
2011-09-02 10:47     ` [PATCH v3 03/10] OMAP4: DSS: HDMI: Use specific HDMI timings structure mythripk
2011-09-02 10:47       ` [PATCH v3 04/10] OMAP4: DSS: HDMI: Move IP independent common header mythripk
2011-09-02 10:47         ` [PATCH v3 05/10] OMAP4 : DSS : HDMI : Move the EDID portion from HDMI mythripk
2011-09-02 10:47           ` [PATCH v3 06/10] OMAP4: DSS2: HDMI: Split the HDMI driver to DSS and IP mythripk
2011-09-02 10:47             ` [PATCH v3 07/10] OMAP4: DSS: HDMI: Rename the functions in HDMI IP mythripk
2011-09-02 10:47               ` [PATCH v3 08/10] OMAP4: DSS: HDMI: Move the common HDMI header file mythripk
2011-09-02 10:47                 ` [PATCH v3 09/10] OMAP4: DSS2: HDMI: Function pointer approach to call mythripk
2011-09-02 10:47                   ` [PATCH v3 10/10] OMAP4: DSS: Rename hdmi_omap4_panel.c to hdmi_panel.c mythripk
2011-09-05  5:40                   ` [PATCH v3 09/10] OMAP4: DSS2: HDMI: Function pointer approach to call Semwal, Sumit
2011-09-05 11:01                   ` Tomi Valkeinen
2011-09-05 17:33                     ` K, Mythri P
2011-09-06  6:08                       ` K, Mythri P
2011-09-06 10:17                         ` Tomi Valkeinen
2011-09-06 11:25                           ` K, Mythri P
2011-09-06 12:45                       ` Tomi Valkeinen [this message]
2011-09-06 13:05                         ` K, Mythri P
2011-09-05  7:40 ` [PATCH v3 00/10]HDMI: Split hdmi.c in DSS to seperate OMAP dependent Tomi Valkeinen
2011-09-05 10:35   ` K, Mythri P
2011-09-05 10:41     ` Tomi Valkeinen
2011-09-05 12:15 ` Tomi Valkeinen
2011-09-05 13:22   ` K, Mythri P
2011-09-06  9:39     ` K, Mythri P
2011-09-06 11:28       ` K, Mythri P

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=1315313126.16126.3.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mythripk@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox