in rk_vop_dpms() set or unset the VOP_STANDBY_EN bit in VOP_SYS_CTRL
depending on the dpms mode requested. this makes pinebook pro display actually turn off when dpms asks.
This commit is contained in:
parent
05e54a628c
commit
43ac7a59e5
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rk_vop.c,v 1.5 2019/12/17 18:30:51 jakllsch Exp $ */
|
/* $NetBSD: rk_vop.c,v 1.6 2020/01/05 12:14:35 mrg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.5 2019/12/17 18:30:51 jakllsch Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.6 2020/01/05 12:14:35 mrg Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/bus.h>
|
#include <sys/bus.h>
|
||||||
@ -265,6 +265,27 @@ static const struct drm_crtc_funcs rk_vop_crtc_funcs = {
|
|||||||
static void
|
static void
|
||||||
rk_vop_dpms(struct drm_crtc *crtc, int mode)
|
rk_vop_dpms(struct drm_crtc *crtc, int mode)
|
||||||
{
|
{
|
||||||
|
struct rk_vop_crtc *mixer_crtc = to_rk_vop_crtc(crtc);
|
||||||
|
struct rk_vop_softc * const sc = mixer_crtc->sc;
|
||||||
|
uint32_t val;
|
||||||
|
|
||||||
|
val = RD4(sc, VOP_SYS_CTRL);
|
||||||
|
|
||||||
|
switch (mode) {
|
||||||
|
case DRM_MODE_DPMS_ON:
|
||||||
|
val &= ~VOP_STANDBY_EN;
|
||||||
|
break;
|
||||||
|
case DRM_MODE_DPMS_STANDBY:
|
||||||
|
case DRM_MODE_DPMS_SUSPEND:
|
||||||
|
case DRM_MODE_DPMS_OFF:
|
||||||
|
val |= VOP_STANDBY_EN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
WR4(sc, VOP_SYS_CTRL, val);
|
||||||
|
|
||||||
|
/* Commit settings */
|
||||||
|
WR4(sc, VOP_REG_CFG_DONE, REG_LOAD_EN);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
Loading…
Reference in New Issue
Block a user