From: Jingoo Han <jg1.han@samsung.com>
To: 'Sylwester Nawrocki' <sylvester.nawrocki@gmail.com>,
'Leela Krishna Amudala' <l.krishna@samsung.com>
Cc: 'Tomasz Figa' <tomasz.figa@gmail.com>,
linux-samsung-soc@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, joshi@samsung.com,
thomas.ab@samsung.com, kgene.kim@samsung.com, olofj@google.com,
linux-arm-kernel@lists.infradead.org,
'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH V2 1/7] ARM: SAMSUNG: add additional registers and SFR definitions for writeback
Date: Mon, 23 Jul 2012 07:35:17 +0900 [thread overview]
Message-ID: <000f01cd685a$44f848c0$cee8da40$%han@samsung.com> (raw)
In-Reply-To: <50092C2F.9010304@gmail.com>
On Friday, July 20, 2012 7:00 PM, Sylwester Nawrocki wrote:
>
> On 07/20/2012 04:59 AM, Leela Krishna Amudala wrote:
> >>>>>> --- a/arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> >>>>>> +++ b/arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> >>>>>> @@ -30,9 +30,16 @@
> >>>>>>
> >>>>>> #define VIDCON1_FSTATUS_EVEN (1<< 15)
> >>>>>>
> >>>>>> /* Video timing controls */
> >>>>>>
> >>>>>> +#ifdef CONFIG_FB_EXYNOS_FIMD_V8
> >>>>>> +#define VIDTCON0 (0x20010)
> >>>>>> +#define VIDTCON1 (0x20014)
> >>>>>> +#define VIDTCON3 (0x2001C)
> >>>>>> +#else
> >>>>>>
> >>>>>> #define VIDTCON0 (0x10)
> >>>>>> #define VIDTCON1 (0x14)
> >>>>>> #define VIDTCON2 (0x18)
> >>>>>>
> >>>>>> +#define VIDTCON3 (0x1C)
> >>>>>> +#endif
> >>>>>
> >>>>> Wouldn't it break s3c-fb on SoCs with earlier FIMD versions with
> >>>>> CONFIG_FB_EXYNOS_FIMD_V8 selected? We are aiming at multi-platform ARM
> >>>>> kernels, aren't we (i.e support of both V8 and earlier FIMD in one
> >>>>> kernel)?
> >>>> Exynos5 has FIMD_V8 and other SoCs has older FIMD versions.
> >>>> As address offsets for certain registers has changed in FIMD_V8, we
> >>>> introduced these defines.
> >>>> So we have to select CONFIG_FB_EXYNOS_FIMD_V8 in case of Exynos5 SoC,
> >>>> and deselect for other SoCs.
> >>>
> >>> Yes, I'm aware of different FIMD versions in different SoCs. My point is
> >>> that it shouldn't be necessary to deselect CONFIG_FB_EXYNOS_FIMD_V8 to
> >>> support other SoCs than Exynos5, i.e. additional config options should be
> >>> incremental - should not break other setups. Ideally there should not be
> >>> any new config option for FIMD v8.
> >>>
> >>> The detection of FIMD version and selection of appropriate register offsets
> >>> should be done in the driver at runtime, based for example on
> >>> platform_device_id (see the s3c-fb driver and usage of s3c_fb_driverdata
> >>> and s3c_fb_win_variant structs).
> >>
> >> I could not agree with Tomasz Figa more.
> >> FIMD register offset should be selected at runtime.
> >>
> >> Leela Krishna Amudala,
> >> Please, don't use ugly "#ifdef".
> >>
> >> Best regards,
> >> Jingoo Han
> >>
> >
> > Yes, Each SoC having its own defconfigs (eg: exynos4_defconfig,
> > exynos5_defconfig etc.,)
> > So, CONFIG_FB_EXYNOS_FIMD_V8 will be added into exynos5_defconfig and
> > it won't affect the other SoCs.
>
> NACK.
>
> As others explained, and you don't seem to understand or you are stubborn
> enough not to change your approach, resolving hardware differences at
> compile time only is not acceptable, especially that Exynos SoCs are
> going to be DT only platforms. We shouldn't be short-sighted like this.
>
> Especially that the problem is relatively easy to solve at run-time, just
> add EXYNOS5_* register address definitions and create separate functions
> at the driver(s) touching those registers that changed on Exynos5.
>
> Or parametrize existing ones with an offset that would be stored in driver
> data passed trough struct platform_device_id::driver_data.
>
> @Jingoo: BTW, shouldn't we have
>
> plat-samsung/include/plat/regs-fb.h
> plat-samsung/include/plat/regs-fb-v4.h
>
> merged into one file and moved under include/video/ ?
Yes, you're right.
I think that these files need to be merged to one file.
Also, 'include/video/' seems to be good.
>
> For example include/video/s3c-fb.h, and board files could also include
> that header. We have FIMD variant structures anyway, so why do we still
> need multiple headers ?
>
> --
>
> Regards,
> Sylwester
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-07-22 22:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 5:57 [PATCH V2 0/7] Add device tree based discovery support for drm-fimd Leela Krishna Amudala
2012-07-18 5:57 ` [PATCH V2 1/7] ARM: SAMSUNG: add additional registers and SFR definitions for writeback Leela Krishna Amudala
2012-07-18 6:51 ` Marek Szyprowski
2012-07-18 7:09 ` Ajay kumar
[not found] ` <CAEC9eQP01q+ddhA9Q4VQcm8wuvJXmR5KvAVZgX6MEdFLstST0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-20 10:09 ` Sylwester Nawrocki
2012-07-19 12:43 ` Leela Krishna Amudala
2012-07-20 6:45 ` Marek Szyprowski
2012-07-18 11:05 ` Tomasz Figa
2012-07-19 13:00 ` Leela Krishna Amudala
2012-07-19 13:35 ` Tomasz Figa
2012-07-20 2:21 ` Jingoo Han
2012-07-20 2:59 ` Leela Krishna Amudala
2012-07-20 9:49 ` Tomasz Figa
2012-07-20 10:00 ` Sylwester Nawrocki
2012-07-20 11:07 ` Leela Krishna Amudala
2012-07-20 12:54 ` Sylwester Nawrocki
2012-07-22 22:35 ` Jingoo Han [this message]
2012-07-18 5:57 ` [PATCH V2 2/7] ARM: EXYNOS5: add machine specific support for backlight Leela Krishna Amudala
2012-07-18 5:57 ` [PATCH V2 3/7] ARM: EXYNOS5: add machine specific support for LCD Leela Krishna Amudala
2012-07-18 6:45 ` Marek Szyprowski
2012-07-19 13:21 ` Leela Krishna Amudala
2012-07-20 6:31 ` Marek Szyprowski
2012-07-24 16:02 ` Leela Krishna Amudala
2012-07-20 7:17 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 4/7] ARM: EXYNOS: Adding DRM platform device Leela Krishna Amudala
2012-07-20 7:33 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 5/7] ARM: EXYNOS: add device tree based discovery support for FIMD Leela Krishna Amudala
2012-07-20 7:39 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 6/7] ARM: EXYNOS5: Add the bus clock " Leela Krishna Amudala
2012-07-23 8:34 ` Joonyoung Shim
2012-07-23 9:54 ` Joonyoung Shim
2012-07-23 23:14 ` Jingoo Han
2012-07-23 23:45 ` Joonyoung Shim
2012-07-23 23:48 ` Jingoo Han
[not found] ` <500DE22F.5010006-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-07-23 23:55 ` Jingoo Han
2012-07-24 1:55 ` Joonyoung Shim
[not found] ` <500E00A3.8080203-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-07-24 2:15 ` Jingoo Han
2012-07-24 3:06 ` Joonyoung Shim
2012-07-24 4:02 ` Jingoo Han
2012-07-24 9:13 ` Sylwester Nawrocki
2012-07-18 5:57 ` [PATCH V2 7/7] ARM: EXYNOS5: Set parent clock to fimd Leela Krishna Amudala
2012-07-23 8:41 ` Joonyoung Shim
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='000f01cd685a$44f848c0$cee8da40$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=joshi@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=l.krishna@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olofj@google.com \
--cc=sylvester.nawrocki@gmail.com \
--cc=thomas.ab@samsung.com \
--cc=tomasz.figa@gmail.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;
as well as URLs for NNTP newsgroup(s).