* [PATCH v8 0/2] Add display-timing node parsing to exynos drm fimd
@ 2013-02-27 11:49 Vikas Sajjan
2013-02-27 11:49 ` [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function Vikas Sajjan
2013-02-27 11:49 ` [PATCH v8 2/2] video: drm: exynos: Add pinctrl support to fimd Vikas Sajjan
0 siblings, 2 replies; 9+ messages in thread
From: Vikas Sajjan @ 2013-02-27 11:49 UTC (permalink / raw)
To: dri-devel
Cc: linux-media, kgene.kim, joshi, inki.dae, l.krishna, patches, linaro-dev
Add display-timing node parsing to drm fimd and depends on
the display helper patchset at
http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
It also adds pinctrl support for drm fimd.
changes since v7:
- addressed comments from Joonyoung Shim <jy0922.shim@samsung.com> to remove a unnecessary variable.
changes since v6:
addressed comments from Inki Dae <inki.dae@samsung.com> to
separated out the pinctrl functionality and made a separate patch.
changes since v5:
- addressed comments from Inki Dae <inki.dae@samsung.com>,
to remove the allocation of 'fbmode' and replaced
'-1'in "of_get_fb_videomode(dev->of_node, fbmode, -1)" with
OF_USE_NATIVE_MODE.
changes since v4:
- addressed comments from Paul Menzel
<paulepanter@users.sourceforge.net>, to modify the commit message
changes since v3:
- addressed comments from Sean Paul <seanpaul@chromium.org>, to modify
the return values and print messages.
changes since v2:
- moved 'devm_pinctrl_get_select_default' function call under
'if (pdev->dev.of_node)', this makes NON-DT code unchanged.
(reported by: Rahul Sharma <r.sh.open@gmail.com>)
changes since v1:
- addressed comments from Sean Paul <seanpaul@chromium.org>
Vikas Sajjan (2):
video: drm: exynos: Add display-timing node parsing using video
helper function
video: drm: exynos: Add pinctrl support to fimd
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 34 ++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-27 11:49 [PATCH v8 0/2] Add display-timing node parsing to exynos drm fimd Vikas Sajjan
@ 2013-02-27 11:49 ` Vikas Sajjan
2013-02-27 19:21 ` Stéphane Marchesin
2013-02-28 2:37 ` Joonyoung Shim
2013-02-27 11:49 ` [PATCH v8 2/2] video: drm: exynos: Add pinctrl support to fimd Vikas Sajjan
1 sibling, 2 replies; 9+ messages in thread
From: Vikas Sajjan @ 2013-02-27 11:49 UTC (permalink / raw)
To: dri-devel
Cc: linux-media, kgene.kim, joshi, inki.dae, l.krishna, patches, linaro-dev
Add support for parsing the display-timing node using video helper
function.
The DT node parsing and pinctrl selection is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.
Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..7932dc2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -20,6 +20,7 @@
#include <linux/of_device.h>
#include <linux/pm_runtime.h>
+#include <video/of_display_timing.h>
#include <video/samsung_fimd.h>
#include <drm/exynos_drm.h>
@@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
DRM_DEBUG_KMS("%s\n", __FILE__);
- pdata = pdev->dev.platform_data;
- if (!pdata) {
- dev_err(dev, "no platform data specified\n");
- return -EINVAL;
+ if (pdev->dev.of_node) {
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata) {
+ DRM_ERROR("memory allocation for pdata failed\n");
+ return -ENOMEM;
+ }
+
+ ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
+ OF_USE_NATIVE_MODE);
+ if (ret) {
+ DRM_ERROR("failed: of_get_fb_videomode()\n"
+ "with return value: %d\n", ret);
+ return ret;
+ }
+ } else {
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ DRM_ERROR("no platform data specified\n");
+ return -EINVAL;
+ }
}
panel = &pdata->panel;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v8 2/2] video: drm: exynos: Add pinctrl support to fimd
2013-02-27 11:49 [PATCH v8 0/2] Add display-timing node parsing to exynos drm fimd Vikas Sajjan
2013-02-27 11:49 ` [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function Vikas Sajjan
@ 2013-02-27 11:49 ` Vikas Sajjan
1 sibling, 0 replies; 9+ messages in thread
From: Vikas Sajjan @ 2013-02-27 11:49 UTC (permalink / raw)
To: dri-devel
Cc: linux-media, kgene.kim, joshi, inki.dae, l.krishna, patches, linaro-dev
Adds support for pinctrl to drm fimd
Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 7932dc2..7d93475 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -19,6 +19,7 @@
#include <linux/clk.h>
#include <linux/of_device.h>
#include <linux/pm_runtime.h>
+#include <linux/pinctrl/consumer.h>
#include <video/of_display_timing.h>
#include <video/samsung_fimd.h>
@@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)
struct exynos_drm_fimd_pdata *pdata;
struct exynos_drm_panel_info *panel;
struct resource *res;
+ struct pinctrl *pctrl;
int win;
int ret = -EINVAL;
@@ -898,6 +900,13 @@ static int fimd_probe(struct platform_device *pdev)
"with return value: %d\n", ret);
return ret;
}
+ pctrl = devm_pinctrl_get_select_default(dev);
+ if (IS_ERR(pctrl)) {
+ DRM_ERROR("failed: devm_pinctrl_get_select_default()\n"
+ "with return value: %d\n", PTR_RET(pctrl));
+ return PTR_ERR(pctrl);
+ }
+
} else {
pdata = pdev->dev.platform_data;
if (!pdata) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-27 11:49 ` [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function Vikas Sajjan
@ 2013-02-27 19:21 ` Stéphane Marchesin
2013-02-27 20:35 ` Stéphane Marchesin
2013-02-28 2:37 ` Joonyoung Shim
1 sibling, 1 reply; 9+ messages in thread
From: Stéphane Marchesin @ 2013-02-27 19:21 UTC (permalink / raw)
To: Vikas Sajjan
Cc: dri-devel, kgene.kim, linaro-dev, patches, l.krishna, joshi, linux-media
On Wed, Feb 27, 2013 at 3:49 AM, Vikas Sajjan <vikas.sajjan@linaro.org> wrote:
> Add support for parsing the display-timing node using video helper
> function.
>
> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
> exists and the NON-DT logic is still maintained under the 'else' part.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 +++++++++++++++++++++----
> 1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 9537761..7932dc2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -20,6 +20,7 @@
> #include <linux/of_device.h>
> #include <linux/pm_runtime.h>
>
> +#include <video/of_display_timing.h>
> #include <video/samsung_fimd.h>
> #include <drm/exynos_drm.h>
>
> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
>
> DRM_DEBUG_KMS("%s\n", __FILE__);
>
> - pdata = pdev->dev.platform_data;
> - if (!pdata) {
> - dev_err(dev, "no platform data specified\n");
> - return -EINVAL;
> + if (pdev->dev.of_node) {
> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + DRM_ERROR("memory allocation for pdata failed\n");
> + return -ENOMEM;
> + }
> +
> + ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
> + OF_USE_NATIVE_MODE);
> + if (ret) {
> + DRM_ERROR("failed: of_get_fb_videomode()\n"
> + "with return value: %d\n", ret);
> + return ret;
Here I think you leak pdata in the error path.
Stéphane
> + }
> + } else {
> + pdata = pdev->dev.platform_data;
> + if (!pdata) {
> + DRM_ERROR("no platform data specified\n");
> + return -EINVAL;
> + }
> }
>
> panel = &pdata->panel;
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-27 19:21 ` Stéphane Marchesin
@ 2013-02-27 20:35 ` Stéphane Marchesin
0 siblings, 0 replies; 9+ messages in thread
From: Stéphane Marchesin @ 2013-02-27 20:35 UTC (permalink / raw)
To: Vikas Sajjan
Cc: dri-devel, kgene.kim, linaro-dev, patches, l.krishna, joshi, linux-media
On Wed, Feb 27, 2013 at 11:21 AM, Stéphane Marchesin
<stephane.marchesin@gmail.com> wrote:
> On Wed, Feb 27, 2013 at 3:49 AM, Vikas Sajjan <vikas.sajjan@linaro.org> wrote:
>> Add support for parsing the display-timing node using video helper
>> function.
>>
>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>> exists and the NON-DT logic is still maintained under the 'else' part.
>>
>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
>> ---
>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 +++++++++++++++++++++----
>> 1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 9537761..7932dc2 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -20,6 +20,7 @@
>> #include <linux/of_device.h>
>> #include <linux/pm_runtime.h>
>>
>> +#include <video/of_display_timing.h>
>> #include <video/samsung_fimd.h>
>> #include <drm/exynos_drm.h>
>>
>> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
>>
>> DRM_DEBUG_KMS("%s\n", __FILE__);
>>
>> - pdata = pdev->dev.platform_data;
>> - if (!pdata) {
>> - dev_err(dev, "no platform data specified\n");
>> - return -EINVAL;
>> + if (pdev->dev.of_node) {
>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>> + if (!pdata) {
>> + DRM_ERROR("memory allocation for pdata failed\n");
>> + return -ENOMEM;
>> + }
>> +
>> + ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
>> + OF_USE_NATIVE_MODE);
>> + if (ret) {
>> + DRM_ERROR("failed: of_get_fb_videomode()\n"
>> + "with return value: %d\n", ret);
>> + return ret;
>
> Here I think you leak pdata in the error path.
>
Hmm nevermind it goes away with the dev.
Stéphane
> Stéphane
>
>> + }
>> + } else {
>> + pdata = pdev->dev.platform_data;
>> + if (!pdata) {
>> + DRM_ERROR("no platform data specified\n");
>> + return -EINVAL;
>> + }
>> }
>>
>> panel = &pdata->panel;
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-27 11:49 ` [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function Vikas Sajjan
2013-02-27 19:21 ` Stéphane Marchesin
@ 2013-02-28 2:37 ` Joonyoung Shim
2013-02-28 2:45 ` Vikas Sajjan
1 sibling, 1 reply; 9+ messages in thread
From: Joonyoung Shim @ 2013-02-28 2:37 UTC (permalink / raw)
To: Vikas Sajjan
Cc: dri-devel, kgene.kim, linaro-dev, patches, l.krishna, joshi, linux-media
On 02/27/2013 08:49 PM, Vikas Sajjan wrote:
> Add support for parsing the display-timing node using video helper
> function.
>
> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
> exists and the NON-DT logic is still maintained under the 'else' part.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 +++++++++++++++++++++----
> 1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 9537761..7932dc2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -20,6 +20,7 @@
> #include <linux/of_device.h>
> #include <linux/pm_runtime.h>
>
> +#include <video/of_display_timing.h>
> #include <video/samsung_fimd.h>
> #include <drm/exynos_drm.h>
>
> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
>
> DRM_DEBUG_KMS("%s\n", __FILE__);
>
> - pdata = pdev->dev.platform_data;
> - if (!pdata) {
> - dev_err(dev, "no platform data specified\n");
> - return -EINVAL;
> + if (pdev->dev.of_node) {
> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + DRM_ERROR("memory allocation for pdata failed\n");
> + return -ENOMEM;
> + }
> +
> + ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
> + OF_USE_NATIVE_MODE);
> + if (ret) {
> + DRM_ERROR("failed: of_get_fb_videomode()\n"
> + "with return value: %d\n", ret);
Could you make this error log to one line?
except this,
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
> + return ret;
> + }
> + } else {
> + pdata = pdev->dev.platform_data;
> + if (!pdata) {
> + DRM_ERROR("no platform data specified\n");
> + return -EINVAL;
> + }
> }
>
> panel = &pdata->panel;
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-28 2:37 ` Joonyoung Shim
@ 2013-02-28 2:45 ` Vikas Sajjan
2013-02-28 2:51 ` Joonyoung Shim
0 siblings, 1 reply; 9+ messages in thread
From: Vikas Sajjan @ 2013-02-28 2:45 UTC (permalink / raw)
To: Joonyoung Shim
Cc: dri-devel, kgene.kim, linaro-dev, patches, l.krishna, joshi, linux-media
Hi,
On 28 February 2013 08:07, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
> On 02/27/2013 08:49 PM, Vikas Sajjan wrote:
>>
>> Add support for parsing the display-timing node using video helper
>> function.
>>
>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>> exists and the NON-DT logic is still maintained under the 'else' part.
>>
>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
>> ---
>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25
>> +++++++++++++++++++++----
>> 1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 9537761..7932dc2 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -20,6 +20,7 @@
>> #include <linux/of_device.h>
>> #include <linux/pm_runtime.h>
>> +#include <video/of_display_timing.h>
>> #include <video/samsung_fimd.h>
>> #include <drm/exynos_drm.h>
>> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
>> *pdev)
>> DRM_DEBUG_KMS("%s\n", __FILE__);
>> - pdata = pdev->dev.platform_data;
>> - if (!pdata) {
>> - dev_err(dev, "no platform data specified\n");
>> - return -EINVAL;
>> + if (pdev->dev.of_node) {
>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>> + if (!pdata) {
>> + DRM_ERROR("memory allocation for pdata failed\n");
>> + return -ENOMEM;
>> + }
>> +
>> + ret = of_get_fb_videomode(dev->of_node,
>> &pdata->panel.timing,
>> + OF_USE_NATIVE_MODE);
>> + if (ret) {
>> + DRM_ERROR("failed: of_get_fb_videomode()\n"
>> + "with return value: %d\n", ret);
>
>
> Could you make this error log to one line?
>
The Line was going beyond 80 line marks, hence I had to split it.
> except this,
> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
>
>
>> + return ret;
>> + }
>> + } else {
>> + pdata = pdev->dev.platform_data;
>> + if (!pdata) {
>> + DRM_ERROR("no platform data specified\n");
>> + return -EINVAL;
>> + }
>> }
>> panel = &pdata->panel;
>
>
--
Thanks and Regards
Vikas Sajjan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-28 2:45 ` Vikas Sajjan
@ 2013-02-28 2:51 ` Joonyoung Shim
2013-02-28 2:56 ` Vikas Sajjan
0 siblings, 1 reply; 9+ messages in thread
From: Joonyoung Shim @ 2013-02-28 2:51 UTC (permalink / raw)
To: Vikas Sajjan
Cc: dri-devel, kgene.kim, linaro-dev, patches, l.krishna, joshi, linux-media
On 02/28/2013 11:45 AM, Vikas Sajjan wrote:
> Hi,
>
> On 28 February 2013 08:07, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>> On 02/27/2013 08:49 PM, Vikas Sajjan wrote:
>>> Add support for parsing the display-timing node using video helper
>>> function.
>>>
>>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>>> exists and the NON-DT logic is still maintained under the 'else' part.
>>>
>>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>>> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
>>> ---
>>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25
>>> +++++++++++++++++++++----
>>> 1 file changed, 21 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> index 9537761..7932dc2 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> @@ -20,6 +20,7 @@
>>> #include <linux/of_device.h>
>>> #include <linux/pm_runtime.h>
>>> +#include <video/of_display_timing.h>
>>> #include <video/samsung_fimd.h>
>>> #include <drm/exynos_drm.h>
>>> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
>>> *pdev)
>>> DRM_DEBUG_KMS("%s\n", __FILE__);
>>> - pdata = pdev->dev.platform_data;
>>> - if (!pdata) {
>>> - dev_err(dev, "no platform data specified\n");
>>> - return -EINVAL;
>>> + if (pdev->dev.of_node) {
>>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>>> + if (!pdata) {
>>> + DRM_ERROR("memory allocation for pdata failed\n");
>>> + return -ENOMEM;
>>> + }
>>> +
>>> + ret = of_get_fb_videomode(dev->of_node,
>>> &pdata->panel.timing,
>>> + OF_USE_NATIVE_MODE);
>>> + if (ret) {
>>> + DRM_ERROR("failed: of_get_fb_videomode()\n"
>>> + "with return value: %d\n", ret);
>>
>> Could you make this error log to one line?
>>
> The Line was going beyond 80 line marks, hence I had to split it.
So remove or contract some log messages, e.g. "with return value"
I think that is unnecessary.
>> except this,
>> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
>>
>>
>>> + return ret;
>>> + }
>>> + } else {
>>> + pdata = pdev->dev.platform_data;
>>> + if (!pdata) {
>>> + DRM_ERROR("no platform data specified\n");
>>> + return -EINVAL;
>>> + }
>>> }
>>> panel = &pdata->panel;
>>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013-02-28 2:51 ` Joonyoung Shim
@ 2013-02-28 2:56 ` Vikas Sajjan
0 siblings, 0 replies; 9+ messages in thread
From: Vikas Sajjan @ 2013-02-28 2:56 UTC (permalink / raw)
To: Joonyoung Shim
Cc: Vikas Sajjan, dri-devel, kgene.kim, linaro-dev, patches,
l.krishna, joshi, linux-media
On Thu, Feb 28, 2013 at 8:21 AM, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
> On 02/28/2013 11:45 AM, Vikas Sajjan wrote:
>>
>> Hi,
>>
>> On 28 February 2013 08:07, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>>>
>>> On 02/27/2013 08:49 PM, Vikas Sajjan wrote:
>>>>
>>>> Add support for parsing the display-timing node using video helper
>>>> function.
>>>>
>>>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>>>> exists and the NON-DT logic is still maintained under the 'else' part.
>>>>
>>>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>>>> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
>>>> ---
>>>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25
>>>> +++++++++++++++++++++----
>>>> 1 file changed, 21 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>>> index 9537761..7932dc2 100644
>>>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>>> @@ -20,6 +20,7 @@
>>>> #include <linux/of_device.h>
>>>> #include <linux/pm_runtime.h>
>>>> +#include <video/of_display_timing.h>
>>>> #include <video/samsung_fimd.h>
>>>> #include <drm/exynos_drm.h>
>>>> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
>>>> *pdev)
>>>> DRM_DEBUG_KMS("%s\n", __FILE__);
>>>> - pdata = pdev->dev.platform_data;
>>>> - if (!pdata) {
>>>> - dev_err(dev, "no platform data specified\n");
>>>> - return -EINVAL;
>>>> + if (pdev->dev.of_node) {
>>>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>>>> + if (!pdata) {
>>>> + DRM_ERROR("memory allocation for pdata
>>>> failed\n");
>>>> + return -ENOMEM;
>>>> + }
>>>> +
>>>> + ret = of_get_fb_videomode(dev->of_node,
>>>> &pdata->panel.timing,
>>>> + OF_USE_NATIVE_MODE);
>>>> + if (ret) {
>>>> + DRM_ERROR("failed: of_get_fb_videomode()\n"
>>>> + "with return value: %d\n", ret);
>>>
>>>
>>> Could you make this error log to one line?
>>>
>> The Line was going beyond 80 line marks, hence I had to split it.
>
>
> So remove or contract some log messages, e.g. "with return value"
> I think that is unnecessary.
>
Will do and resend.
>
>>> except this,
>>> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
>>>
>>>
>>>> + return ret;
>>>> + }
>>>> + } else {
>>>> + pdata = pdev->dev.platform_data;
>>>> + if (!pdata) {
>>>> + DRM_ERROR("no platform data specified\n");
>>>> + return -EINVAL;
>>>> + }
>>>> }
>>>> panel = &pdata->panel;
>>>
>>>
>>
>>
>
> --
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-02-28 2:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27 11:49 [PATCH v8 0/2] Add display-timing node parsing to exynos drm fimd Vikas Sajjan
2013-02-27 11:49 ` [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function Vikas Sajjan
2013-02-27 19:21 ` Stéphane Marchesin
2013-02-27 20:35 ` Stéphane Marchesin
2013-02-28 2:37 ` Joonyoung Shim
2013-02-28 2:45 ` Vikas Sajjan
2013-02-28 2:51 ` Joonyoung Shim
2013-02-28 2:56 ` Vikas Sajjan
2013-02-27 11:49 ` [PATCH v8 2/2] video: drm: exynos: Add pinctrl support to fimd Vikas Sajjan
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.