diff mbox

[1/3] Move FIMD register headers to include/video/

Message ID 000701cd6ef5$24315c70$6c941550$%han@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jingoo Han July 31, 2012, 8:19 a.m. UTC
On Tuesday, July 31, 2012 3:28 PM Marek Szyprowski wrote:
> 
> Hello,
> 
> On Tuesday, July 31, 2012 2:48 AM Jingoo Han wrote:
> 
> > On Monday, July 30, 2012 8:16 PM, Leela Krishna Amudala wrote:
> > >
> > > Hello Jingoo Han,
> > >
> > > On Mon, Jul 30, 2012 at 2:23 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> > > > On Monday, July 30, 2012 5:45 PM, Leela Krishna Amudala wrote:
> > > >>
> > > >> Moved the contents of regs-fb-v4.h and regs-fb.h from arch side
> > > >> to include/video/samsung_fimd.h
> > > >>
> > > >> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> > > >> ---
> > > >>  arch/arm/plat-samsung/include/plat/regs-fb-v4.h |  159 -------
> > > >>  arch/arm/plat-samsung/include/plat/regs-fb.h    |  403 -----------------
> > > >>  include/video/samsung_fimd.h                    |  533 +++++++++++++++++++++++
> > > >>  3 files changed, 533 insertions(+), 562 deletions(-)
> > > >>  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> > > >>  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
> > > >>  create mode 100644 include/video/samsung_fimd.h
> > > >>
> > > >> +*/
> > > >> +
> > > >> +/*FIMD V8 REG OFFSET */
> > > >> +#define FIMD_V8_VIDTCON0     (0x20010)
> > > >> +#define FIMD_V8_VIDTCON1     (0x20014)
> > > >> +#define FIMD_V8_VIDTCON2     (0x20018)
> > > >> +#define FIMD_V8_VIDTCON3     (0x2001C)
> > > >> +#define FIMD_V8_VIDCON1              (0x20004)
> >
> >
> > How about using soc_is_exynos5250()?
> >
> > +#define VIDTCON0				(soc_is_exynos5250() ? \
> > +						(0x20010) : (0x10))
> >
> > In this case, the FIMD driver does not need to change.
> > Also, one binary is available.
> 
> Please don't mix two methods of runtime detection. FIMD driver (s3c-fb) already
> has runtime hw detection based on platform device id. Adding such detection for
> exynos5 to DRM FIMD driver should not be a big issue too.

Marek,
Then, do you want use like this?

#define VIDTCON0				(0x10)
+#define FIMD_V8_VIDTCON0			(0x20010)

> Best regards
> --
> Marek Szyprowski
> Samsung Poland R&D Center


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Marek Szyprowski July 31, 2012, 8:32 a.m. UTC | #1
Hello,

On Tuesday, July 31, 2012 10:19 AM Jingoo Han wrote:

> On Tuesday, July 31, 2012 3:28 PM Marek Szyprowski wrote:
> >
> > Hello,
> >
> > On Tuesday, July 31, 2012 2:48 AM Jingoo Han wrote:
> >
> > > On Monday, July 30, 2012 8:16 PM, Leela Krishna Amudala wrote:
> > > >
> > > > Hello Jingoo Han,
> > > >
> > > > On Mon, Jul 30, 2012 at 2:23 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> > > > > On Monday, July 30, 2012 5:45 PM, Leela Krishna Amudala wrote:
> > > > >>
> > > > >> Moved the contents of regs-fb-v4.h and regs-fb.h from arch side
> > > > >> to include/video/samsung_fimd.h
> > > > >>
> > > > >> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> > > > >> ---
> > > > >>  arch/arm/plat-samsung/include/plat/regs-fb-v4.h |  159 -------
> > > > >>  arch/arm/plat-samsung/include/plat/regs-fb.h    |  403 -----------------
> > > > >>  include/video/samsung_fimd.h                    |  533 +++++++++++++++++++++++
> > > > >>  3 files changed, 533 insertions(+), 562 deletions(-)
> > > > >>  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> > > > >>  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
> > > > >>  create mode 100644 include/video/samsung_fimd.h
> > > > >>
> > > > >> +*/
> > > > >> +
> > > > >> +/*FIMD V8 REG OFFSET */
> > > > >> +#define FIMD_V8_VIDTCON0     (0x20010)
> > > > >> +#define FIMD_V8_VIDTCON1     (0x20014)
> > > > >> +#define FIMD_V8_VIDTCON2     (0x20018)
> > > > >> +#define FIMD_V8_VIDTCON3     (0x2001C)
> > > > >> +#define FIMD_V8_VIDCON1              (0x20004)
> > >
> > >
> > > How about using soc_is_exynos5250()?
> > >
> > > +#define VIDTCON0				(soc_is_exynos5250() ? \
> > > +						(0x20010) : (0x10))
> > >
> > > In this case, the FIMD driver does not need to change.
> > > Also, one binary is available.
> >
> > Please don't mix two methods of runtime detection. FIMD driver (s3c-fb) already
> > has runtime hw detection based on platform device id. Adding such detection for
> > exynos5 to DRM FIMD driver should not be a big issue too.
> 
> Marek,
> Then, do you want use like this?
> 
> #define VIDTCON0				(0x10)
> +#define FIMD_V8_VIDTCON0			(0x20010)
> 
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1924,7 +1924,7 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = {
>  static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
>         .variant = {
>                 .nr_windows     = 5,
> -               .vidtcon        = VIDTCON0,
> +               .vidtcon        = FIMD_V8_VIDTCON0,

Yes, this method looks good imo. Maybe even having something like vidtcon_base in 
variant structure will be enough to cover all VIDTCON0-3 registers.

Best regards
Kim Kukjin Aug. 1, 2012, 1:56 a.m. UTC | #2
Marek Szyprowski wrote:
> 
> Hello,
> 
Hi all,

[...]

> >  static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
> >         .variant = {
> >                 .nr_windows     = 5,
> > -               .vidtcon        = VIDTCON0,
> > +               .vidtcon        = FIMD_V8_VIDTCON0,
> 
> Yes, this method looks good imo. Maybe even having something like
> vidtcon_base in
> variant structure will be enough to cover all VIDTCON0-3 registers.
> 
Yes, I agree. And how about changing the name of s3c_fb_drvierdata to
xxx_fimd_v8 not xxx_fimd_exynos5? It's time to use independent from SoC name
because we don't have any guarantee of same address on all of EXYNOS5 SoCs.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1924,7 +1924,7 @@  static struct s3c_fb_driverdata s3c_fb_data_exynos4 = {
 static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
        .variant = {
                .nr_windows     = 5,
-               .vidtcon        = VIDTCON0,
+               .vidtcon        = FIMD_V8_VIDTCON0,


>