From: Hans Verkuil <hansverk@cisco.com>
To: Kamil Debski <kamil@wypas.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Hans Verkuil <hans.verkuil@cisco.com>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
Kyungmin Park <kyungmin.park@samsung.com>,
thomas@tommie-lie.de, sean@mess.org, dmitry.torokhov@gmail.com,
linux-input@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
lars@opdenkamp.eu
Subject: Re: [PATCHv7 14/15] cec: s5p-cec: Add s5p-cec driver
Date: Thu, 23 Jul 2015 19:22:20 +0200 [thread overview]
Message-ID: <55B122CC.1000605@cisco.com> (raw)
In-Reply-To: <CAP3TMiF-swEQU7KJWaA5NXgbkf1u8o_7vmjXf9QFuHj83MmDyw@mail.gmail.com>
On 07/23/2015 06:39 PM, Kamil Debski wrote:
> Hi,
>
> On 21 July 2015 at 15:03, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>> Hello,
>>
>> On 2015-07-16 15:09, Hans Verkuil wrote:
>>>
>>> Marek, Kamil,
>>>
>>> On 06/29/15 12:14, Hans Verkuil wrote:
>>>>
>>>> From: Kamil Debski <kamil@wypas.org>
>>>>
>>>> Add CEC interface driver present in the Samsung Exynos range of
>>>> SoCs.
>>>>
>>>> The following files were based on work by SangPil Moon:
>>>> - exynos_hdmi_cec.h
>>>> - exynos_hdmi_cecctl.c
>>>>
>>>> Signed-off-by: Kamil Debski <kamil@wypas.org>
>>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>>>> ---
>>>
>>> <snip>
>>>
>>>> diff --git a/drivers/media/platform/s5p-cec/s5p_cec.c
>>>> b/drivers/media/platform/s5p-cec/s5p_cec.c
>>>> new file mode 100644
>>>> index 0000000..0f16d00
>>>> --- /dev/null
>>>> +++ b/drivers/media/platform/s5p-cec/s5p_cec.c
>>>> @@ -0,0 +1,283 @@
>>>> +/* drivers/media/platform/s5p-cec/s5p_cec.c
>>>> + *
>>>> + * Samsung S5P CEC driver
>>>> + *
>>>> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or modify
>>>> + * it under the terms of the GNU General Public License as published by
>>>> + * the Free Software Foundation; either version 2 of the License, or
>>>> + * (at your option) any later version.
>>>> + *
>>>> + * This driver is based on the "cec interface driver for exynos soc" by
>>>> + * SangPil Moon.
>>>> + */
>>>> +
>>>> +#include <linux/clk.h>
>>>> +#include <linux/interrupt.h>
>>>> +#include <linux/kernel.h>
>>>> +#include <linux/mfd/syscon.h>
>>>> +#include <linux/module.h>
>>>> +#include <linux/of.h>
>>>> +#include <linux/platform_device.h>
>>>> +#include <linux/pm_runtime.h>
>>>> +#include <linux/timer.h>
>>>> +#include <linux/version.h>
>>>> +#include <linux/workqueue.h>
>>>> +#include <media/cec.h>
>>>> +
>>>> +#include "exynos_hdmi_cec.h"
>>>> +#include "regs-cec.h"
>>>> +#include "s5p_cec.h"
>>>> +
>>>> +#define CEC_NAME "s5p-cec"
>>>> +
>>>> +static int debug;
>>>> +module_param(debug, int, 0644);
>>>> +MODULE_PARM_DESC(debug, "debug level (0-2)");
>>>> +
>>>> +static int s5p_cec_enable(struct cec_adapter *adap, bool enable)
>>>> +{
>>>> + struct s5p_cec_dev *cec = container_of(adap, struct s5p_cec_dev,
>>>> adap);
>>>> + int ret;
>>>> +
>>>> + if (enable) {
>>>> + ret = pm_runtime_get_sync(cec->dev);
>>>> +
>>>> + adap->phys_addr = 0x100b;
>>>
>>> This is a bogus physical address. The actual physical address has to be
>>> derived
>>> from the EDID that is read by the HDMI transmitter.
>>>
>>> I think in the case of this driver it will have to be userspace that
>>> assigns
>>> the physical address after reading the EDID from drm/kms?
>>>
>>> How did you test this, Kamil?
>>
>>
>> If I remember correctly, physical address has been derived from EDID in the
>> userspace (it is available in /sys/class/drm/*) and passed to s5p-cec driver
>> by
>> appropriate ioctl.
>>
>> I don't know what is the reason for the above 'adap->phys_addr = 0x100b'
>> assignment.
>
> At some point there was an idea to read the address from the EDID in
> kernel. This static address was a hack until the code that reads the
> EDID is written. As you say, it is much better to leave the address to
> be set by the userspace. So this assignment serves no purpose anymore.
Thank you, that's what I thought. It's fixed in my current tree. Still
working on the CEC framework: I'm chasing race conditions and I suspect
that there may be a bug in the adv7604 or adv7511 CEC implementation.
Once I've sorted that I post a new version which has been tested a lot
more thoroughly and should be complete except for the documentation.
Regards,
Hans
next prev parent reply other threads:[~2015-07-23 17:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 10:14 [PATCHv7 00/15] HDMI CEC framework Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 01/15] dts: exynos4*: add HDMI CEC pin definition to pinctrl Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 02/15] dts: exynos4: add node for the HDMI CEC device Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 03/15] dts: exynos4412-odroid*: enable " Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 04/15] HID: add HDMI CEC specific keycodes Hans Verkuil
2015-06-29 19:25 ` Dmitry Torokhov
2015-06-30 7:36 ` Hans Verkuil
2015-06-30 16:43 ` Dmitry Torokhov
2015-06-29 10:14 ` [PATCHv7 05/15] input.h: add BUS_CEC type Hans Verkuil
2015-06-29 19:24 ` Dmitry Torokhov
2015-06-29 10:14 ` [PATCHv7 06/15] rc: Add HDMI CEC protocol handling Hans Verkuil
2015-06-29 10:14 ` Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 07/15] cec: add HDMI CEC framework Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 08/15] cec.txt: add CEC framework documentation Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 09/15] DocBook/media: add CEC documentation Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 10/15] v4l2-subdev: add HDMI CEC ops Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 11/15] cec: adv7604: add cec support Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 12/15] adv7842: " Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 13/15] cec: adv7511: " Hans Verkuil
2015-06-29 10:14 ` [PATCHv7 14/15] cec: s5p-cec: Add s5p-cec driver Hans Verkuil
2015-07-16 13:09 ` Hans Verkuil
2015-07-21 13:03 ` Marek Szyprowski
2015-07-21 13:03 ` Marek Szyprowski
2015-07-23 16:39 ` Kamil Debski
2015-07-23 17:22 ` Hans Verkuil [this message]
2015-06-29 10:15 ` [PATCHv7 15/15] cobalt: add cec support Hans Verkuil
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=55B122CC.1000605@cisco.com \
--to=hansverk@cisco.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=kamil@wypas.org \
--cc=kyungmin.park@samsung.com \
--cc=lars@opdenkamp.eu \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sean@mess.org \
--cc=thomas@tommie-lie.de \
/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 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.