<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 2017年02月15日 04:32, Daniel Stone
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPj87rOz=opS8s=m0eX1e+hS5WyQMnpogg2J_e9eaHq+N-K7Pg@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi John,

On 14 February 2017 at 19:25, John Stultz <a class="moz-txt-link-rfc2396E" href="mailto:john.stultz@linaro.org"><john.stultz@linaro.org></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">+static enum drm_mode_status
+drm_connector_check_crtc_modes(struct drm_connector *connector,
+                              struct drm_display_mode *mode)
+{
+       struct drm_device *dev = connector->dev;
+       const struct drm_crtc_helper_funcs *crtc_funcs;
+       struct drm_crtc *c;
+
+       if (mode->status != MODE_OK)
+               return mode->status;
+
+       /* Check all the crtcs on a connector to make sure the mode is valid */
+       drm_for_each_crtc(c, dev) {
+               crtc_funcs = c->helper_private;
+               if (crtc_funcs && crtc_funcs->mode_valid)
+                       mode->status = crtc_funcs->mode_valid(c, mode);
+               if (mode->status != MODE_OK)
+                       break;
+       }
+       return mode->status;
+}
</pre>
      </blockquote>
      <pre wrap="">
Hm, that's unfortunate: it limits the mode list for every connector,
to those which are supported by every single CRTC. So if you have one
CRTC serving low-res LVDS, and another serving higher-res HDMI,
suddenly you can't get bigger modes on HDMI. The idea seems sound
enough, but a little more nuance might be good ...</pre>
    </blockquote>
    <br>
    John, I have same requirement, also want to valid mode with crtc,<br>
    here is my patch[0], use encoder->possible_crtcs to limit the
    crtc valid, may be can solved the low-res and high-res problem.<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    [0]: <a class="moz-txt-link-freetext" href="https://patchwork.kernel.org/patch/9555945">https://patchwork.kernel.org/patch/9555945</a><br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
        /*<br>
         * ensure all drm display mode can work, if someone want support
    more<br>
         * resolutions, please limit the possible_crtc, only connect to<br>
         * needed crtc.<br>
         */<br>
        drm_for_each_crtc(crtc, connector->dev) {<br>
            [...]<br>
            if (!(encoder->possible_crtcs & drm_crtc_mask(crtc)))<br>
    <br>
    <br>
    <blockquote
cite="mid:CAPj87rOz=opS8s=m0eX1e+hS5WyQMnpogg2J_e9eaHq+N-K7Pg@mail.gmail.com"
      type="cite">
      <pre wrap="">

Cheers,
Daniel
_______________________________________________
dri-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/dri-devel">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Mark Yao</pre>
  </body>
</html>