- Expand dma-buf MAINTAINER scope
- Fix mode matching for drivers not using picture_aspect_ratio -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEHF6rntfJ3enn8gh8cywAJXLcr3kFAl3xXZwACgkQcywAJXLc r3kz0gf/cPrbZYz2kcAh+uCWdEDiISIM9kTfTUyhuR/5F5IOIPCpGT2JgqbDC28p 1uCgPJ9opnTSBHb3vSuUwHF5kK7nhf870XlJnY33IykciSjpd/EBdIbeEPFu5HlF lHn6Mg6U1bSaZL+4jvyKQNyQfwOgOGwdwXVRTVLuVne01rhiQnAKQ76FWKQ4Zqlb Av7bTZLJb5doMCpOptulduxE5RYlJ8wbSBNCBWTdc+29HS+9ae/1g0XneVn5trFv D1jNCoRghEXmFJeTOZjksnnszTAkI5gzSkCGGqY5chFSB5gtB0imQZYIgc1cSDhN NZPboEWuavN04fE1QJQJYwGr1ebAwA== =Qwc3 -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2019-12-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - Expand dma-buf MAINTAINER scope - Fix mode matching for drivers not using picture_aspect_ratio Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20191211212107.GA257983@art_vandelay
This commit is contained in:
commit
5ba0474882
|
@ -4970,6 +4970,7 @@ F: include/linux/dma-buf*
|
|||
F: include/linux/reservation.h
|
||||
F: include/linux/*fence.h
|
||||
F: Documentation/driver-api/dma-buf.rst
|
||||
K: dma_(buf|fence|resv)
|
||||
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||
|
||||
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
|
||||
|
|
|
@ -64,6 +64,25 @@ struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT] = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct meson_cvbs_mode *
|
||||
meson_cvbs_get_mode(const struct drm_display_mode *req_mode)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
|
||||
struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
|
||||
|
||||
if (drm_mode_match(req_mode, &meson_mode->mode,
|
||||
DRM_MODE_MATCH_TIMINGS |
|
||||
DRM_MODE_MATCH_CLOCK |
|
||||
DRM_MODE_MATCH_FLAGS |
|
||||
DRM_MODE_MATCH_3D_FLAGS))
|
||||
return meson_mode;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Connector */
|
||||
|
||||
static void meson_cvbs_connector_destroy(struct drm_connector *connector)
|
||||
|
@ -136,14 +155,8 @@ static int meson_venc_cvbs_encoder_atomic_check(struct drm_encoder *encoder,
|
|||
struct drm_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
|
||||
struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
|
||||
|
||||
if (drm_mode_equal(&crtc_state->mode, &meson_mode->mode))
|
||||
return 0;
|
||||
}
|
||||
if (meson_cvbs_get_mode(&crtc_state->mode))
|
||||
return 0;
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -191,24 +204,17 @@ static void meson_venc_cvbs_encoder_mode_set(struct drm_encoder *encoder,
|
|||
struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adjusted_mode)
|
||||
{
|
||||
const struct meson_cvbs_mode *meson_mode = meson_cvbs_get_mode(mode);
|
||||
struct meson_venc_cvbs *meson_venc_cvbs =
|
||||
encoder_to_meson_venc_cvbs(encoder);
|
||||
struct meson_drm *priv = meson_venc_cvbs->priv;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MESON_CVBS_MODES_COUNT; ++i) {
|
||||
struct meson_cvbs_mode *meson_mode = &meson_cvbs_modes[i];
|
||||
if (meson_mode) {
|
||||
meson_venci_cvbs_mode_set(priv, meson_mode->enci);
|
||||
|
||||
if (drm_mode_equal(mode, &meson_mode->mode)) {
|
||||
meson_venci_cvbs_mode_set(priv,
|
||||
meson_mode->enci);
|
||||
|
||||
/* Setup 27MHz vclk2 for ENCI and VDAC */
|
||||
meson_vclk_setup(priv, MESON_VCLK_TARGET_CVBS,
|
||||
MESON_VCLK_CVBS, MESON_VCLK_CVBS,
|
||||
MESON_VCLK_CVBS, true);
|
||||
break;
|
||||
}
|
||||
/* Setup 27MHz vclk2 for ENCI and VDAC */
|
||||
meson_vclk_setup(priv, MESON_VCLK_TARGET_CVBS, MESON_VCLK_CVBS,
|
||||
MESON_VCLK_CVBS, MESON_VCLK_CVBS, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue