Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls

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

 



On 07/07/2016 02:16 AM, Niklas Söderlund wrote:
> Hi Ulrich,
> 
> Thanks for your patch.
> 
> On 2016-07-06 17:39:36 +0200, Ulrich Hecht wrote:
>> Adds G_EDID and S_EDID.
>>
>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx>
>> ---
>>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> index 396eabc..bd8f14c 100644
>> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> @@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
>>  	return ret;
>>  }
>>  
>> +static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
>> +{
>> +	struct rvin_dev *vin = video_drvdata(file);
>> +
>> +	return rvin_subdev_call(vin, pad, get_edid, edid);
> 
> You need to add a translation from the rcar-vin drivers view of it's 
> current input to the subdevices view of how it's pads are arranged. I 
> think something like this would work:
> 
>     struct rvin_dev *vin = video_drvdata(file);
>     unsigned int input;
>     int ret;
> 
>     input = edid->pad;
> 
>     edid->pad = vin->inputs[input].sink_idx;
> 
>     ret = vin_subdev_call(vin, pad, get_edid, edid);
> 
>     edid->pad = input;
> 
>     return ret;
> 
> I know it's not obvious you need this and I can't figure out a better 
> way to solve runtime switching of subdevices. Any ideas on how to 
> improve the situation are more then welcome :-)

I agree it is ugly, but it isn't used often enough to warrant the extra
work. I am thinking that the pad should be an extra argument in the subdev
op instead of using edid->pad. That should simplify the code.

Regards,

	Hans



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux