[PATCH v5 05/11] drm: add Atmel HLCDC Display Controller support
Rob Clark
robdclark at gmail.com
Sat Sep 27 20:52:44 PDT 2014
On Sat, Sep 27, 2014 at 4:12 PM, Boris BREZILLON
<boris.brezillon at free-electrons.com> wrote:
>> > +static int atmel_hlcdc_rgb_mode_valid(struct drm_connector *connector,
>> > + struct drm_display_mode *mode)
>> > +{
>> > + return MODE_OK;
>> > +}
>>
>> your _mode_valid() should perhaps somehow check the constraints in
>> atmel_hlcdc_crtc_mode_set()? This way invalid modes get filtered out
>> earlier..
>
> I'm not sure, the test done in atmel_hlcdc_crtc_mode_set are not
> connector related, but rather imposed by the display controller
> limitations.
> Anyway, let me know if you still think I should move those tests in the
> connector mode_valid implementation.
it gets a bit tricky if you have multiple crtc with different
constants which can be hooked to any connector (which I'm not sure if
that is the case here).. but for sure if you can eliminate modes that
cannot possibly work regardless of the crtc chosen, that is a good
thing.
So you may have to preserve the checks in the crtc.. but if you can
filter anything that is completely impossible in the connector, you
should.
BR,
-R
More information about the dri-devel
mailing list