From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 24/28] drm: Document drm_connector_helper_funcs Date: Mon, 7 Dec 2015 15:42:22 +0100 Message-ID: <20151207144222.GE13177@ulmo> References: <1449218769-16577-1-git-send-email-daniel.vetter@ffwll.ch> <1449218769-16577-25-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1470581567==" Return-path: In-Reply-To: <1449218769-16577-25-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Intel Graphics Development , DRI Development List-Id: intel-gfx@lists.freedesktop.org --===============1470581567== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HFNNDGBA8bk+zEXz" Content-Disposition: inline --HFNNDGBA8bk+zEXz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 04, 2015 at 09:46:05AM +0100, Daniel Vetter wrote: > Nothing special, except the somewhat awkard split in probe helper "awkward" > callbacks between here and drm_crtc_funcs. >=20 > Signed-off-by: Daniel Vetter > --- > include/drm/drm_modeset_helper_vtables.h | 106 +++++++++++++++++++++++++= ++++-- > 1 file changed, 101 insertions(+), 5 deletions(-) >=20 > diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_m= odeset_helper_vtables.h > index 66b78c14154e..22cc51b278fb 100644 > --- a/include/drm/drm_modeset_helper_vtables.h > +++ b/include/drm/drm_modeset_helper_vtables.h > @@ -264,18 +264,114 @@ static inline void drm_encoder_helper_add(struct d= rm_encoder *encoder, > =20 > /** > * struct drm_connector_helper_funcs - helper operations for connectors > - * @get_modes: get mode list for this connector > - * @mode_valid: is this mode valid on the given connector? (optional) > - * @best_encoder: return the preferred encoder for this connector > - * @atomic_best_encoder: atomic version of @best_encoder > * > - * The helper operations are called by the mid-layer CRTC helper. > + * These functions are used by the atomic and legacy modeset helpers and= by the > + * probe helpers. > */ > struct drm_connector_helper_funcs { > + /** > + * @get_modes: > + * > + * This function should fill in all modes currently valid for the sink > + * into the connector->probe_modes function. It should also update the What's probe_modes? I've never heard of it. Did you mean ->fill_modes()? Also it's strange to say "fill into the ... function". Perhaps "pass into the ... function" instead? > + * EDID property by calling drm_mode_connector_update_edid_property(). > + * > + * The usual way to implement this is to cache the EDID retrieved in the > + * probe callback somewhere in the driver-private connector structure. > + * In this function drivers then parse the modes in the EDID and add it "add them"? > + * by calling drm_add_edid_modes(). But connectors that driver a fixed "drive" > + * panel can also manually add specific modes using > + * drm_mode_probed_add(). Finally drivers that support audio propably "probably" > + /** > + * @mode_valid: > + * > + * Callback to validate a mode for a connector, irrespective of the > + * specific display configuration. > + * > + * This callback is used by the probe helpers to filter the mode list > + * (which is usually derived from the EDID data block from the sink). > + * See e.g. drm_helper_probe_single_connector_modes(). > + * > + * NOTE: > + * > + * This only filters the mode list supplied to userspace in the > + * GETCONNECOTR ioctl. Userspace is free to create modes of its own and "GETCONNECTOR IOCTL" > + * ask the kernel to use it. It this case the atomic helpers or legacy "to use them" > + * CRTC heleprs will not call this function. Drivers therefore must "helpers" > + * still fully validate any mode passed in in a modeset request. > + * > + * RETURNS: > + * > + * Either DRM_MODE_OK or one of the failure reasons in enum The enum value is MODE_OK, without the DRM_ prefix. Thierry --HFNNDGBA8bk+zEXz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWZZrMAAoJEN0jrNd/PrOh4aYQAJHUpQfeAuVtqv9LVSmcXuwF rFXQ2ymepXm0sO5eRhDTwGZfn0X/PD17oF916HvXLf2hFux4Rn+mPtpuVnVqA4dY f8gtwIwEE/CTkpLcMOaQYhrKn7XgdPqF7Nrk9wpS1FX07OPD3P9PFwJTg+svWHKQ +ujon2KyDGqJ36cyXdkKXc5q+6HqTZT6l5DEl0/RN9t+wLs6E3daSVopwm7hG9rv +7KL48WIpaK+aKz+ltDilaIDeMHBosIyuiF1+0lr70/f6o6vZy05AznulMHSnoxl FEd/ZL6d/Jkq/1gBDU35E++axgDen8JAlYVumqGRvRkM8dL90mVVJroh8NXQEo3+ EeAshQX8d+WDOxvH9rASxY15K7Hfp9IkH3gbvWomm9ee3j6UBmfhLSEPVh87ZW7w pMj5xtsEXeTEalvz2gZAZmOjqfeH4M2OQAxptescvPfIAL2WjCt0EB6MvsCgTpiq WwlzhEXEq8VoUhmkri0IR+PS1hf1S20M5bSZUusHzzX+XJKqF3vVkq27LyzWY75e YgYrPJ6x+T69KXJDN9HW7pyiWOS0hTlJfA07fGxjqykHNhHEhnhgtx9JaSOvkrvF d0PUP5b773UcQMDCLzCVTS4iJQSwX1Wlrbxryr49GFCIE8JotfaazVgbTer1RJlQ pw1M8Y1U8sIyelTVRKjQ =Tm3k -----END PGP SIGNATURE----- --HFNNDGBA8bk+zEXz-- --===============1470581567== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============1470581567==--