Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 28 February 2013 08:07, Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> 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@xxxxxxxxxxx>
>> Signed-off-by: Vikas Sajjan <vikas.sajjan@xxxxxxxxxx>
>> ---
>>   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@xxxxxxxxxxx>
>
>
>> +                       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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux