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: <CAKMK7uE5gzDjBTg=XoaxB7mY89SR8yhaC9rCXHE4mCaXuqDBHA@mail.gmail.com>
Date:   Wed, 8 Feb 2017 08:34:01 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Mark yao <mark.yao@...k-chips.com>
Cc:     Sean Paul <seanpaul@...omium.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/2] drm/rockchip: support mode_valid for crtc

On Wed, Feb 8, 2017 at 1:45 AM, Mark yao <mark.yao@...k-chips.com> wrote:
> On 2017年02月08日 00:14, Sean Paul wrote:
>>
>> On Sun, Feb 05, 2017 at 03:36:36PM +0800, Mark Yao wrote:
>>>
>>> drm crtc already has mode_fixup callback to can do mode check, but
>>> We actually want to valid display mode on connector getmode time,
>>> mode_fixup can't do it.
>>>
>>> So add a private mode_valid callback to rockchip crtc, connectors can
>>> check mode with this mode_valid callback.
>>>
>> There are some nasty layer violations happening in this set. You should
>> use
>> mode_fixup if the crtc has limitations on the mode being set.
>>
>> Sean
>
> Mode_fixup can also check crtc limitations, but it's secondly time to check
> display mode.
>
> mode_fixup only works on drm_setcrtc or atomic_commit check, when userspace
> get a series of display modes,
> They don't know which display mode is bad before drm_setcrtc or
> atomic_commit check, they need try,
> but drm_setcrtc or atomic_commit check not only for display mode check,
> means that userspace didn't have a sure
> method to verify display mode.
>
> So I try to add the mode_valid callback to connector getmodes time, verify
> display mode before send mode list to userspace.
> then userspace would get a good display mode list.

You need both, the kerneldoc of these hooks explains in detail why.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ