Message ID | 1359107722-9974-2-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Superseded |
Headers | show |
2013/1/25 Sachin Kamat <sachin.kamat@linaro.org>: > From: Ajay Kumar <ajaykumar.rs@samsung.com> > > This patch adds device tree match table for Exynos G2D controller. > > Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c > index ddcfb5d..d24b170 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c > @@ -19,6 +19,7 @@ > #include <linux/workqueue.h> > #include <linux/dma-mapping.h> > #include <linux/dma-attrs.h> > +#include <linux/of.h> > > #include <drm/drmP.h> > #include <drm/exynos_drm.h> > @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev) > > static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume); > > +#ifdef CONFIG_OF > +static const struct of_device_id exynos_g2d_match[] = { > + { .compatible = "samsung,g2d-v41" }, not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d driver shoud support for all Exynos SoCs. How about using "samsung,exynos5-g2d" instead and adding a new property 'version' to identify ip version more surely? With this, we could know which SoC and its g2d ip version. The version property could have '0x14' or others. And please add descriptions to dt document. > + {}, > +}; > +MODULE_DEVICE_TABLE(of, exynos_g2d_match); > +#endif > + > struct platform_driver g2d_driver = { > .probe = g2d_probe, > .remove = g2d_remove, > @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = { > .name = "s5p-g2d", > .owner = THIS_MODULE, > .pm = &g2d_pm_ops, > + .of_match_table = of_match_ptr(exynos_g2d_match), > }, > }; > -- > 1.7.4.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
On 01/30/2013 09:50 AM, Inki Dae wrote: >> +static const struct of_device_id exynos_g2d_match[] = { >> + { .compatible = "samsung,g2d-v41" }, > > not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d > driver shoud support for all Exynos SoCs. How about using > "samsung,exynos5-g2d" instead and adding a new property 'version' to > identify ip version more surely? With this, we could know which SoC > and its g2d ip version. The version property could have '0x14' or > others. And please add descriptions to dt document. Err no. Are you suggesting using "samsung,exynos5-g2d" compatible string for Exynos4 specific IPs ? This would not be correct, and you still can match the driver with multiple different revisions of the IP and associate any required driver's private data with each corresponding compatible property. Perhaps it would make more sense to include the SoCs name in the compatible string, e.g. "samsung,exynos-g2d-v41", but appending revision of the IP seems acceptable to me. The revisions appear to be well documented and it's more or less clear which one corresponds to which SoC. -- Thanks, Sylwester
> -----Original Message----- > From: Sylwester Nawrocki [mailto:sylvester.nawrocki@gmail.com] > Sent: Thursday, January 31, 2013 5:51 AM > To: Inki Dae > Cc: Sachin Kamat; linux-media@vger.kernel.org; dri- > devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; > patches@linaro.org; s.nawrocki@samsung.com > Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery > support for G2D > > On 01/30/2013 09:50 AM, Inki Dae wrote: > >> +static const struct of_device_id exynos_g2d_match[] = { > >> + { .compatible = "samsung,g2d-v41" }, > > > > not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d > > driver shoud support for all Exynos SoCs. How about using > > "samsung,exynos5-g2d" instead and adding a new property 'version' to > > identify ip version more surely? With this, we could know which SoC > > and its g2d ip version. The version property could have '0x14' or > > others. And please add descriptions to dt document. > > Err no. Are you suggesting using "samsung,exynos5-g2d" compatible string > for Exynos4 specific IPs ? This would not be correct, and you still can I assumed the version 'v41' is the ip for Exynos5 SoC. So if this version means Exynos4 SoC then it should be "samsung,exynos4-g2d". > match the driver with multiple different revisions of the IP and associate > any required driver's private data with each corresponding compatible > property. > Right, and for why I prefer to use version property instead of embedded version string, you can refer to the my comment I replied already to the "drm/exynos: Get HDMI version from device tree" email thread. > Perhaps it would make more sense to include the SoCs name in the > compatible > string, e.g. "samsung,exynos-g2d-v41", but appending revision of the IP > seems acceptable to me. The revisions appear to be well documented and > it's > more or less clear which one corresponds to which SoC. > > -- > > Thanks, > Sylwester
Hi Inki, On 01/31/2013 02:30 AM, Inki Dae wrote: >> -----Original Message----- >> From: Sylwester Nawrocki [mailto:sylvester.nawrocki@gmail.com] >> Sent: Thursday, January 31, 2013 5:51 AM >> To: Inki Dae >> Cc: Sachin Kamat; linux-media@vger.kernel.org; dri- >> devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; >> patches@linaro.org; s.nawrocki@samsung.com >> Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery >> support for G2D >> >> On 01/30/2013 09:50 AM, Inki Dae wrote: >>>> +static const struct of_device_id exynos_g2d_match[] = { >>>> + { .compatible = "samsung,g2d-v41" }, >>> >>> not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d >>> driver shoud support for all Exynos SoCs. How about using >>> "samsung,exynos5-g2d" instead and adding a new property 'version' to >>> identify ip version more surely? With this, we could know which SoC >>> and its g2d ip version. The version property could have '0x14' or >>> others. And please add descriptions to dt document. >> >> Err no. Are you suggesting using "samsung,exynos5-g2d" compatible string >> for Exynos4 specific IPs ? This would not be correct, and you still can > > I assumed the version 'v41' is the ip for Exynos5 SoC. So if this version > means Exynos4 SoC then it should be "samsung,exynos4-g2d". Yes, v3.0 is implemented in the S5PC110 (Exynos3110) SoCs and Exynos4210, V4.1 can be found in Exynos4212 and Exynos4412, if I'm not mistaken. So we could have: compatible = "samsung,exynos-g2d-3.0" /* for Exynos3110, Exynos4210 */ compatible = "samsung,exynos-g2d-4.1" /* for Exynos4212, Exynos4412 */ or alternatively compatible = "samsung,exynos3110-g2d" /* for Exynos3110, Exynos4210 */ compatible = "samsung,exynos4212-g2d" /* for Exynos4212, Exynos4412 */ I don't see a need to use an additional redundant property to identify the device. These IPs across Exynos SoC do differ and specifying a general property like "samsung,exynos4-g2d" for them would simply be a violation of existing conventions. -- Thanks, Sylwester
Sylwester Nawrocki wrote: > > Hi Inki, > Hi Sylwester and Inki, > On 01/31/2013 02:30 AM, Inki Dae wrote: > >> -----Original Message----- > >> From: Sylwester Nawrocki [mailto:sylvester.nawrocki@gmail.com] > >> Sent: Thursday, January 31, 2013 5:51 AM > >> To: Inki Dae > >> Cc: Sachin Kamat; linux-media@vger.kernel.org; dri- > >> devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; > >> patches@linaro.org; s.nawrocki@samsung.com > >> Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery > >> support for G2D > >> > >> On 01/30/2013 09:50 AM, Inki Dae wrote: > >>>> +static const struct of_device_id exynos_g2d_match[] = { > >>>> + { .compatible = "samsung,g2d-v41" }, > >>> > >>> not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d > >>> driver shoud support for all Exynos SoCs. How about using > >>> "samsung,exynos5-g2d" instead and adding a new property 'version' to > >>> identify ip version more surely? With this, we could know which SoC > >>> and its g2d ip version. The version property could have '0x14' or > >>> others. And please add descriptions to dt document. > >> > >> Err no. Are you suggesting using "samsung,exynos5-g2d" compatible > string > >> for Exynos4 specific IPs ? This would not be correct, and you still can > > > > I assumed the version 'v41' is the ip for Exynos5 SoC. So if this version > > means Exynos4 SoC then it should be "samsung,exynos4-g2d". > > Yes, v3.0 is implemented in the S5PC110 (Exynos3110) SoCs and Exynos4210, > V4.1 can be found in Exynos4212 and Exynos4412, if I'm not mistaken. > > So we could have: > > compatible = "samsung,exynos-g2d-3.0" /* for Exynos3110, Exynos4210 */ > compatible = "samsung,exynos-g2d-4.1" /* for Exynos4212, Exynos4412 */ > In my opinion, this is better than later. Because as I said, when we can use IP version to identify, it is more clear and can be used One more, how about following? compatible = "samsung,g2d-3.0" compatible = "samsung,g2d-4.1" I think, just g2d is enough. For example, we are using it for mfc like following: compatible = "samsung.mfc-v6" > or alternatively > > compatible = "samsung,exynos3110-g2d" /* for Exynos3110, Exynos4210 */ > compatible = "samsung,exynos4212-g2d" /* for Exynos4212, Exynos4412 */ > Thanks. - Kukjin
Hi Kukjin, > -----Original Message----- > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > owner@vger.kernel.org] On Behalf Of Kukjin Kim > Sent: Friday, February 01, 2013 9:15 AM > To: 'Sylwester Nawrocki'; 'Inki Dae' > Cc: 'Sachin Kamat'; linux-media@vger.kernel.org; dri- > devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; > patches@linaro.org; s.nawrocki@samsung.com > Subject: RE: [PATCH 2/2] drm/exynos: Add device tree based discovery > support for G2D > > Sylwester Nawrocki wrote: > > > > Hi Inki, > > > Hi Sylwester and Inki, > > > On 01/31/2013 02:30 AM, Inki Dae wrote: > > >> -----Original Message----- > > >> From: Sylwester Nawrocki [mailto:sylvester.nawrocki@gmail.com] > > >> Sent: Thursday, January 31, 2013 5:51 AM > > >> To: Inki Dae > > >> Cc: Sachin Kamat; linux-media@vger.kernel.org; dri- > > >> devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; > > >> patches@linaro.org; s.nawrocki@samsung.com > > >> Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery > > >> support for G2D > > >> > > >> On 01/30/2013 09:50 AM, Inki Dae wrote: > > >>>> +static const struct of_device_id exynos_g2d_match[] = { > > >>>> + { .compatible = "samsung,g2d-v41" }, > > >>> > > >>> not only Exynos5 and also Exyno4 has the g2d gpu and drm-based g2d > > >>> driver shoud support for all Exynos SoCs. How about using > > >>> "samsung,exynos5-g2d" instead and adding a new property 'version' to > > >>> identify ip version more surely? With this, we could know which SoC > > >>> and its g2d ip version. The version property could have '0x14' or > > >>> others. And please add descriptions to dt document. > > >> > > >> Err no. Are you suggesting using "samsung,exynos5-g2d" compatible > > string > > >> for Exynos4 specific IPs ? This would not be correct, and you still > can > > > > > > I assumed the version 'v41' is the ip for Exynos5 SoC. So if this > version > > > means Exynos4 SoC then it should be "samsung,exynos4-g2d". > > > > Yes, v3.0 is implemented in the S5PC110 (Exynos3110) SoCs and Exynos4210, > > V4.1 can be found in Exynos4212 and Exynos4412, if I'm not mistaken. > > > > So we could have: > > > > compatible = "samsung,exynos-g2d-3.0" /* for Exynos3110, Exynos4210 */ > > compatible = "samsung,exynos-g2d-4.1" /* for Exynos4212, Exynos4412 */ > > > In my opinion, this is better than later. Because as I said, when we can > use > IP version to identify, it is more clear and can be used > > One more, how about following? > > compatible = "samsung,g2d-3.0" > compatible = "samsung,g2d-4.1" > I think compatible string should be considered case by case. For example, If compatible = "samsung,g2d-3.0" is added to exynos4210.dtsi, it'd be reasonable. But what if that compatible string is added to exynos4.dtsi?. This case isn't considered for exynos4412 SoC with v4.1. So at least shouldn't that compatible string include SoC version so that that can be added to proper dtsi file? And I'm not sure how the ip version should be dealt with as of now:( Really enough to know the ip version implicitly(ie. exynos4412 string means implicitly that its g2d ip version is v4.1 so its device driver refers to the necessary data through of_device_id's data)? > I think, just g2d is enough. For example, we are using it for mfc like > following: compatible = "samsung.mfc-v6" > > > or alternatively > > > > compatible = "samsung,exynos3110-g2d" /* for Exynos3110, Exynos4210 */ > > compatible = "samsung,exynos4212-g2d" /* for Exynos4212, Exynos4412 */ > > So, IMO, I think this is better than first one. Thanks, Inki Dae > Thanks. > > - Kukjin > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1 February 2013 06:57, Inki Dae <inki.dae@samsung.com> wrote: > > For example, > If compatible = "samsung,g2d-3.0" is added to exynos4210.dtsi, it'd be > reasonable. But what if that compatible string is added to exynos4.dtsi?. > This case isn't considered for exynos4412 SoC with v4.1. In case of Exynos4 series the base address of G2D ip is different across series. Hence we cannot define it in exynos4.dtsi and need to define the nodes in exynos4xxx.dtsi or specific board files. Thus we can use the version appended compatible string. However even the second option suggested by Sylwester is OK with me or to be even more specific we could go for both SoC as well as version option something like this. compatible = "samsung,exynos3110-g2d-3.0" /* for Exynos3110, Exynos4210 */ compatible = "samsung,exynos4212-g2d-4.1" /* for Exynos4212, Exynos4412 */ In any case please let me know the final preferred one so that I can update the code send the revised patches.
On 02/01/2013 09:33 AM, Sachin Kamat wrote: > On 1 February 2013 06:57, Inki Dae <inki.dae@samsung.com> wrote: >> >> For example, >> If compatible = "samsung,g2d-3.0" is added to exynos4210.dtsi, it'd be >> reasonable. But what if that compatible string is added to exynos4.dtsi?. >> This case isn't considered for exynos4412 SoC with v4.1. > > In case of Exynos4 series the base address of G2D ip is different > across series. Hence we cannot define it in exynos4.dtsi and need to > define the nodes in exynos4xxx.dtsi or specific board files. Thus we > can use the version appended compatible string. > > However even the second option suggested by Sylwester is OK with me or > to be even more specific we could go for both SoC as well as version > option something like this. > > compatible = "samsung,exynos3110-g2d-3.0" /* for Exynos3110, Exynos4210 */ > compatible = "samsung,exynos4212-g2d-4.1" /* for Exynos4212, Exynos4412 */ > > In any case please let me know the final preferred one so that I can > update the code send the revised patches. The version with SoC name embedded in it seems most reliable and correct to me. compatible = "samsung,exynos3110-fimg-2d" /* for Exynos3110 (S5PC110, S5PV210), Exynos4210 */ compatible = "samsung,exynos4212-fimg-2d" /* for Exynos4212, Exynos4412 */ FIMG stands for Fully Interactive Mobile Graphics, and other multimedia IPs follow this naming convention, e.g. FIMG-3D, FIMD (Display Controller), FIMC (Camera), etc. This is just my opinion though, and it seems this is a most common scheme from greping the device tree bindings documentation. As Stephen pointed out, and I also did in some other mail thread in the past, not only an IP revision might be required, but also its integration details, specific to an SoC type are important. This actually happens to be the case with FIMC, where same version of one instance of the IP has more data interfaces routed to other SoC subsystems on one SoC type than on other one. I think it won't be possible to use a scheme like "samsung-exynos-g2d-3.0" for all IPs. And I would much more like to see a uniform naming convention used, rather than living with a chaotic set of compatible properties, that has a potential to become even more chaotic in the future. -- Thanks, Sylwester
>> In any case please let me know the final preferred one so that I can >> update the code send the revised patches. > > The version with SoC name embedded in it seems most reliable and correct > to me. > > compatible = "samsung,exynos3110-fimg-2d" /* for Exynos3110 (S5PC110, S5PV210), > Exynos4210 */ > compatible = "samsung,exynos4212-fimg-2d" /* for Exynos4212, Exynos4412 */ > Looks good to me. Inki, Kukjin, please let us know your opinion so that we can freeze this. Also please suggest the SoC name for Exynos5 (5250?).
> -----Original Message----- > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > owner@vger.kernel.org] On Behalf Of Sachin Kamat > Sent: Friday, February 01, 2013 8:13 PM > To: Sylwester Nawrocki > Cc: Inki Dae; Kukjin Kim; Sylwester Nawrocki; linux-media@vger.kernel.org; > dri-devel@lists.freedesktop.org; devicetree-discuss@lists.ozlabs.org; > patches@linaro.org > Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery > support for G2D > > >> In any case please let me know the final preferred one so that I can > >> update the code send the revised patches. > > > > The version with SoC name embedded in it seems most reliable and correct > > to me. > > > > compatible = "samsung,exynos3110-fimg-2d" /* for Exynos3110 (S5PC110, > S5PV210), > > Exynos4210 */ > > compatible = "samsung,exynos4212-fimg-2d" /* for Exynos4212, Exynos4412 > */ > > > Looks good to me. > > Inki, Kukjin, please let us know your opinion so that we can freeze > this. Also please suggest the SoC name for Exynos5 (5250?). > How about using like below? Compatible = ""samsung,exynos4x12-fimg-2d" /* for Exynos4212, Exynos4412 */ It looks odd to use "samsung,exynos4212-fimg-2d" saying that this ip is for exynos4212 and exynos4412. > -- > With warm regards, > Sachin > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1 February 2013 17:02, Inki Dae <inki.dae@samsung.com> wrote: > > How about using like below? > Compatible = ""samsung,exynos4x12-fimg-2d" /* for Exynos4212, > Exynos4412 */ > It looks odd to use "samsung,exynos4212-fimg-2d" saying that this ip is for > exynos4212 and exynos4412. AFAIK, compatible strings are not supposed to have any wildcard characters. Compatible string should suggest the first SoC that contained this IP. Hence IMO 4212 is OK.
> -----Original Message----- > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > owner@vger.kernel.org] On Behalf Of Sachin Kamat > Sent: Friday, February 01, 2013 8:40 PM > To: Inki Dae > Cc: Sylwester Nawrocki; Kukjin Kim; Sylwester Nawrocki; linux- > media@vger.kernel.org; dri-devel@lists.freedesktop.org; devicetree- > discuss@lists.ozlabs.org; patches@linaro.org > Subject: Re: [PATCH 2/2] drm/exynos: Add device tree based discovery > support for G2D > > On 1 February 2013 17:02, Inki Dae <inki.dae@samsung.com> wrote: > > > > How about using like below? > > Compatible = ""samsung,exynos4x12-fimg-2d" /* for Exynos4212, > > Exynos4412 */ > > It looks odd to use "samsung,exynos4212-fimg-2d" saying that this ip is > for > > exynos4212 and exynos4412. > > AFAIK, compatible strings are not supposed to have any wildcard characters. > Compatible string should suggest the first SoC that contained this IP. > Hence IMO 4212 is OK. > Got it. Please post it again. > > -- > With warm regards, > Sachin > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
Sylwester Nawrocki wrote: > > On 02/01/2013 09:33 AM, Sachin Kamat wrote: > > On 1 February 2013 06:57, Inki Dae <inki.dae@samsung.com> wrote: > >> > >> For example, > >> If compatible = "samsung,g2d-3.0" is added to exynos4210.dtsi, it'd be > >> reasonable. But what if that compatible string is added to exynos4.dtsi?. > >> This case isn't considered for exynos4412 SoC with v4.1. > > > > In case of Exynos4 series the base address of G2D ip is different > > across series. Hence we cannot define it in exynos4.dtsi and need to > > define the nodes in exynos4xxx.dtsi or specific board files. Thus we > > can use the version appended compatible string. > > > > However even the second option suggested by Sylwester is OK with me or > > to be even more specific we could go for both SoC as well as version > > option something like this. > > > > compatible = "samsung,exynos3110-g2d-3.0" /* for Exynos3110, > Exynos4210 */ > > compatible = "samsung,exynos4212-g2d-4.1" /* for Exynos4212, > Exynos4412 */ > > > > In any case please let me know the final preferred one so that I can > > update the code send the revised patches. > > The version with SoC name embedded in it seems most reliable and correct > to me. > > compatible = "samsung,exynos3110-fimg-2d" /* for Exynos3110 (S5PC110, > S5PV210), > Exynos4210 */ If this convention will be used, I hope, the known name, S5PV210 can be used. Why don't you use same SoC name with using in arch/arm/? > compatible = "samsung,exynos4212-fimg-2d" /* for Exynos4212, Exynos4412 > */ > > FIMG stands for Fully Interactive Mobile Graphics, and other multimedia > IPs follow this naming convention, e.g. FIMG-3D, FIMD (Display Controller), > FIMC (Camera), etc. > How about MFC? > This is just my opinion though, and it seems this is a most common scheme > from greping the device tree bindings documentation. > IMO, you can grep '$ git grep compatible.*samsung'...or IP name. > As Stephen pointed out, and I also did in some other mail thread in the > past, not only an IP revision might be required, but also its integration > details, specific to an SoC type are important. This actually happens > to be the case with FIMC, where same version of one instance of the IP > has more data interfaces routed to other SoC subsystems on one SoC type > than on other one. > Well, I don't think so. As you know Samsung makes many EXYNOS SoCs and nowadays the EXYNOS SoCs include many Samsung own IPs such as multimedia. And the IPs are reused on across Samsung SoCs, and I hope on other SoC vendor's SoC. It means Samsung is no longer just SoC vendor and can be called IP vendor. So let's see other IP vendors, ARM, Synopsys and so on. How are their IPs implemented in kernel? Why should Samsung use the SoC name for their IP? And why should we use old SoC name in futre? For example, see the s3c2410-xxx for i2c, wdt, rtc, i2s and so on. Unfortunately, no one didn't know Samsung should prepare some brand name or future at that time...Just I don't want to undergo trial and error again. I'm still saying why Samsung own IPs cannot be used as IP vendors' ones... > I think it won't be possible to use a scheme like "samsung-exynos-g2d-3.0" Hmm...I think, the name, 'EXYNOS' is not a brand name for IP... > for all IPs. And I would much more like to see a uniform naming convention > used, rather than living with a chaotic set of compatible properties, that > has a potential to become even more chaotic in the future. > Thanks. - Kukjin
Kukjin Kim wrote: > Oops, I'm re-sending due to my e-mail client problem :-( > Sylwester Nawrocki wrote: > > > > On 02/01/2013 09:33 AM, Sachin Kamat wrote: > > > On 1 February 2013 06:57, Inki Dae <inki.dae@samsung.com> wrote: > > >> > > >> For example, > > >> If compatible = "samsung,g2d-3.0" is added to exynos4210.dtsi, it'd be > > >> reasonable. But what if that compatible string is added to exynos4.dtsi?. > > >> This case isn't considered for exynos4412 SoC with v4.1. > > > > > > In case of Exynos4 series the base address of G2D ip is different > > > across series. Hence we cannot define it in exynos4.dtsi and need to > > > define the nodes in exynos4xxx.dtsi or specific board files. Thus we > > > can use the version appended compatible string. > > > > > > However even the second option suggested by Sylwester is OK with me > or > > > to be even more specific we could go for both SoC as well as version > > > option something like this. > > > > > > compatible = "samsung,exynos3110-g2d-3.0" /* for Exynos3110, > > Exynos4210 */ > > > compatible = "samsung,exynos4212-g2d-4.1" /* for Exynos4212, > > Exynos4412 */ > > > > > > In any case please let me know the final preferred one so that I can > > > update the code send the revised patches. > > > > The version with SoC name embedded in it seems most reliable and correct > > to me. > > > > compatible = "samsung,exynos3110-fimg-2d" /* for Exynos3110 (S5PC110, > > S5PV210), > > Exynos4210 */ > > If this convention will be used, I hope, the known name, S5PV210 can be > used. Why don't you use same SoC name with using in arch/arm/? > > > compatible = "samsung,exynos4212-fimg-2d" /* for Exynos4212, > Exynos4412 > > */ > > > > FIMG stands for Fully Interactive Mobile Graphics, and other multimedia > > IPs follow this naming convention, e.g. FIMG-3D, FIMD (Display Controller), > > FIMC (Camera), etc. > > > How about MFC? > > > This is just my opinion though, and it seems this is a most common scheme > > from greping the device tree bindings documentation. > > > IMO, you can grep '$ git grep compatible.*samsung'...or IP name. > > > As Stephen pointed out, and I also did in some other mail thread in the > > past, not only an IP revision might be required, but also its integration > > details, specific to an SoC type are important. This actually happens > > to be the case with FIMC, where same version of one instance of the IP > > has more data interfaces routed to other SoC subsystems on one SoC type > > than on other one. > > > Well, I don't think so. As you know Samsung makes many EXYNOS SoCs and > nowadays the EXYNOS SoCs include many Samsung own IPs such as > multimedia. And the IPs are reused on across Samsung SoCs, and I hope on > other SoC vendor's SoC. It means Samsung is no longer just SoC vendor and > can be called IP vendor. So let's see other IP vendors, ARM, Synopsys and so > on. How are their IPs implemented in kernel? Why should Samsung use the > SoC name for their IP? And why should we use old SoC name in futre? For > example, see the s3c2410-xxx for i2c, wdt, rtc, i2s and so on. Unfortunately, > no one didn't know Samsung should prepare some brand name or future at > that time...Just I don't want to undergo trial and error again. I'm still saying > why Samsung own IPs cannot be used as IP vendors' ones... > > > I think it won't be possible to use a scheme like "samsung-exynos-g2d-3.0" > > Hmm...I think, the name, 'EXYNOS' is not a brand name for IP... > > > for all IPs. And I would much more like to see a uniform naming convention > > used, rather than living with a chaotic set of compatible properties, that > > has a potential to become even more chaotic in the future. > Thanks. - Kukjin
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index ddcfb5d..d24b170 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -19,6 +19,7 @@ #include <linux/workqueue.h> #include <linux/dma-mapping.h> #include <linux/dma-attrs.h> +#include <linux/of.h> #include <drm/drmP.h> #include <drm/exynos_drm.h> @@ -1240,6 +1241,14 @@ static int g2d_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume); +#ifdef CONFIG_OF +static const struct of_device_id exynos_g2d_match[] = { + { .compatible = "samsung,g2d-v41" }, + {}, +}; +MODULE_DEVICE_TABLE(of, exynos_g2d_match); +#endif + struct platform_driver g2d_driver = { .probe = g2d_probe, .remove = g2d_remove, @@ -1247,5 +1256,6 @@ struct platform_driver g2d_driver = { .name = "s5p-g2d", .owner = THIS_MODULE, .pm = &g2d_pm_ops, + .of_match_table = of_match_ptr(exynos_g2d_match), }, };