lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 16 Jan 2017 15:39:48 -0800
From:   John Stultz <john.stultz@...aro.org>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        David Airlie <airlied@...ux.ie>,
        Archit Taneja <architt@...eaurora.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [RFC][PATCH] drm/bridge: adv7511: Re-write the i2c address as it
 may have been lost

On Mon, Jan 16, 2017 at 3:36 PM, Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
> Hi John,
>
> Thank you for the patch.
>
> On Monday 16 Jan 2017 15:16:51 John Stultz wrote:
>> Laurent: Would something like the following be preferred? Seems
>> to work as well for me..
>
> That looks good to me. Feel free to still de-duplicate the power on/off code
> if you want (but of course without adding the regcache_sync to the common
> power on function this time).

Ok.  Will do that. Thanks again for the feedback/direction here!

>> @@ -576,6 +578,9 @@ static int adv7511_get_modes(struct adv7511 *adv7511,
>>                                    ADV7511_INT1_DDC_ERROR);
>>               }
>>               adv7511->current_edid_segment = -1;
>> +
>> +             /* Reset the EDID_I2C_ADDR register as it may have been
> cleared */
>> +             regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR,
> edid_i2c_addr);
>
> As powering the device off called regcache_mark_dirty(), this will perform an
> I2C write and cache the value. If we then try to read the EDID a second time
> without going through a full power on/off sequence, I believe that regmap will
> skip the write the second time, as the cache will contain the same value and
> won't be marked as dirty. Should we call regcache_mark_dirty() when powering
> the device down further down this function ?

Ah. Right. I had this in my earlier attempt, but thought I was
simplifying things here. I'll correct this in the next revision.

Thanks again!
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ