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]
Message-ID: <587ED13C.3000301@rock-chips.com>
Date:   Wed, 18 Jan 2017 10:21:48 +0800
From:   Mark yao <mark.yao@...k-chips.com>
To:     Chris Zhong <zyw@...k-chips.com>, John Keeping <john@...anate.com>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-rockchip@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [01/26] drm/rockchip: dw-mipi-dsi: use mode from display state

On 2017年01月17日 18:38, Chris Zhong wrote:
>> @@ -821,8 +824,6 @@ static void dw_mipi_dsi_encoder_mode_set(struct 
>> drm_encoder *encoder,
>>       struct dw_mipi_dsi *dsi = encoder_to_dsi(encoder);
>>       int ret;
>>   -    dsi->mode = adjusted_mode;
>> -
> I prefer to keep the original method, although this"dsi->mode" pointer 
> is same as "&dsi->connector.state->crtc->state->adjusted_mode; "
> I still think dsi->mode makes the process easier to read
"&dsi->connector.state->crtc->state->adjusted_mode;" is too long, and 
dsi->connector.state->crtc can be NULL, seems not good.

agree with Chris, I think dsi->mode is better.

Bug the origin code "dsi->mode = adjusted_mode; " also has a bug, 
adjusted_mode's lift time is unknown, use a pointer from adjusted_mode 
is dangerous.

I think we can use like that, copy a display mode to dsi->mode:
struct dw_mipi_dsi
{
    -    struct drm_display_mode *mode;
    +    struct drm_display_mode mode;
}
   xxx_encoder_mode_set()
{
    drm_mode_copy(&dsi->mode, adjusted_mode);
}

-- 
Mark Yao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ