On Sun, 17 Apr 2016 13:26:58 +0300 Giulio Camuffo <[email protected]> wrote:
> Hi, > > I don't understand this one at all, you're moving configuration back > into the backend, partially reverting patch 5. > Hi, indeed, the very reason we are working on this patch series is to take all .ini file parsing, struct weston_config, and command line parsing out from the backends and libweston. That is also why we need the configure_output callback for now, to let main.c handle configuring outputs that were not explicitly mentioned in configuration. I'm with Giulio here. Thanks, pq > 2016-04-16 6:28 GMT+03:00 Bryce Harrington <[email protected]>: > > Signed-off-by: Bryce Harrington <[email protected]> > > --- > > src/compositor-drm.c | 93 > > ++++++++++++++++++++++++++++++++++++++++++++-------- > > src/compositor-drm.h | 41 ----------------------- > > src/main.c | 43 ------------------------ > > 3 files changed, 80 insertions(+), 97 deletions(-) > > > > diff --git a/src/compositor-drm.c b/src/compositor-drm.c > > index 6ef706a..d129adc 100644 > > --- a/src/compositor-drm.c > > +++ b/src/compositor-drm.c > > @@ -75,6 +75,41 @@ > > #define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64 > > #endif > > > > +enum weston_drm_backend_output_mode { > > + /** The output is disabled */ > > + WESTON_DRM_BACKEND_OUTPUT_OFF, > > + > > + /** The output will use the current active mode */ > > + WESTON_DRM_BACKEND_OUTPUT_CURRENT, > > + > > + /** The output will use the preferred mode. A modeline can be > > provided > > + * by setting weston_backend_output_config::modeline in the form of > > + * "WIDTHxHEIGHT" or in the form of an explicit modeline calculated > > + * using e.g. the cvt tool. If a valid modeline is supplied it will > > be > > + * used, if invalid or NULL the preferred available mode will be > > used. */ > > + WESTON_DRM_BACKEND_OUTPUT_PREFERRED, > > +}; > > + > > +struct weston_drm_backend_output_config { > > + struct weston_backend_output_config base; > > + > > + /** The pixel format to be used by the output. Valid values are: > > + * - NULL - The format set at backend creation time will be used > > + * - "xrgb8888" > > + * - "rgb565" > > + * - "xrgb2101010" > > + */ > > + char *gbm_format; > > + > > + /** The seat to be used by the output. Set to NULL to use the > > + * default seat. */ > > + char *seat; > > + > > + /** The modeline to be used by the output. Refer to the > > documentation > > + * of WESTON_DRM_BACKEND_OUTPUT_PREFERRED for details. */ > > + char *modeline; > > +}; > > + > > struct drm_backend { > > struct weston_backend base; > > struct weston_compositor *compositor; > > @@ -121,16 +156,6 @@ struct drm_backend { > > int32_t cursor_width; > > int32_t cursor_height; > > > > - /** Callback used to configure the outputs. > > - * > > - * This function will be called by the backend when a new DRM > > - * output needs to be configured. > > - */ > > - enum weston_drm_backend_output_mode > > - (*configure_output)(struct weston_compositor *compositor, > > - bool use_current_mode, > > - const char *name, > > - struct weston_drm_backend_output_config > > *output_config); > > bool use_current_mode; > > }; > > > > @@ -2275,6 +2300,49 @@ connector_get_current_mode(drmModeConnector > > *connector, int drm_fd, > > return 0; > > } > > > > +static enum weston_drm_backend_output_mode > > +drm_configure_output(struct weston_compositor *c, > > + bool use_current_mode, > > + const char *name, > > + struct weston_drm_backend_output_config *config) > > +{ > > + struct weston_config *wc = weston_compositor_get_user_data(c); > > This is wrong, you're assuming the user data is a weston_config, which > won't be true for non-weston compositors. > > Sorry, but NAK from me. > > > Giulio
pgpiCVkb2Kyix.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
