-/* $OpenBSD: rkdrm.c,v 1.22 2024/05/13 01:15:50 jsg Exp $ */
+/* $OpenBSD: rkdrm.c,v 1.23 2024/08/21 11:24:12 jsg Exp $ */
/* $NetBSD: rk_drm.c,v 1.3 2019/12/15 01:00:58 mrg Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
rkdrm_wsioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct rasops_info *ri = v;
- struct rkdrm_softc *sc = ri->ri_hw;
struct wsdisplay_param *dp = (struct wsdisplay_param *)data;
struct wsdisplay_fbinfo *wdf;
struct drm_fb_helper *helper = &sc->helper;
struct rasops_info *ri = &sc->ro;
struct rkdrm_framebuffer *sfb;
- struct drm_device *ddev;
uint32_t *ports;
int i, portslen, nports;
int console = 0;
int
rkdrm_fb_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes)
{
- struct rkdrm_softc *sc = rkdrm_private(helper->dev);
struct drm_device *ddev = helper->dev;
struct rkdrm_framebuffer *sfb = to_rkdrm_framebuffer(helper->fb);
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
struct drm_framebuffer *fb = helper->fb;
- struct wsemuldisplaydev_attach_args aa;
- struct rasops_info *ri = &sc->ro;
- struct rkdrmfb_attach_args sfa;
unsigned int bytes_per_pixel;
struct fb_info *info;
size_t size;
-/* $OpenBSD: rkdrm.h,v 1.4 2023/09/11 04:51:24 jsg Exp $ */
+/* $OpenBSD: rkdrm.h,v 1.5 2024/08/21 11:24:12 jsg Exp $ */
/* $NetBSD: rk_drm.h,v 1.1 2019/11/09 23:30:14 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
#define DRIVER_MINOR 0
#define DRIVER_PATCHLEVEL 0
-struct rk_framebuffer;
-
#define RK_DRM_MAX_CRTC 2
struct rkdrm_vblank {
struct drm_gem_dma_object *obj;
};
-struct rkdrm_fbdev {
- struct drm_fb_helper helper;
-};
-
-struct rkdrmfb_attach_args {
- struct drm_device *sfa_drm_dev;
- struct drm_fb_helper *sfa_fb_helper;
- struct drm_fb_helper_surface_size sfa_fb_sizes;
- bus_space_tag_t sfa_fb_iot;
- bus_dma_tag_t sfa_fb_dmat;
- uint32_t sfa_fb_linebytes;
-};
-
-#define rkdrm_private(ddev) (ddev)->dev_private
#define to_rkdrm_framebuffer(x) container_of(x, struct rkdrm_framebuffer, base)
#endif /* _ARM_RK_DRM_H */
-/* $OpenBSD: rkdwhdmi.c,v 1.7 2024/01/16 23:37:50 jsg Exp $ */
+/* $OpenBSD: rkdwhdmi.c,v 1.8 2024/08/21 11:24:12 jsg Exp $ */
/* $NetBSD: rk_dwhdmi.c,v 1.4 2019/12/17 18:26:36 jakllsch Exp $ */
/*-
struct rkdwhdmi_softc *sc = (struct rkdwhdmi_softc *)self;
struct fdt_attach_args *faa = aux;
uint32_t grf;
- bus_addr_t addr;
- bus_size_t size;
uint32_t phandle;
if (faa->fa_nreg < 1) {
-/* $OpenBSD: rkvop.c,v 1.7 2023/01/01 01:34:33 jsg Exp $ */
+/* $OpenBSD: rkvop.c,v 1.8 2024/08/21 11:24:12 jsg 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>
{
struct rkvop_softc *sc = (struct rkvop_softc *)self;
struct fdt_attach_args *faa = aux;
- int i, port, ep, nep;
paddr_t paddr;
if (faa->fa_nreg < 1)
void
rkvop_plane_update(struct drm_plane *plane, struct drm_atomic_state *das)
{
- struct drm_plane_state *old_state = drm_atomic_get_new_plane_state(das,
- plane);
struct drm_plane_state *state = plane->state;
struct drm_crtc *crtc = state->crtc;
struct rkvop_crtc *rkcrtc = to_rkvop_crtc(crtc);
void
rkvop_crtc_enable(struct drm_crtc *crtc, struct drm_atomic_state *das)
{
- struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(das,
- crtc);
struct rkvop_crtc *rkcrtc = to_rkvop_crtc(crtc);
struct rkvop_softc *sc = rkcrtc->sc;
struct drm_display_mode *adjusted_mode = &crtc->state->adjusted_mode;
void
rkvop_crtc_flush(struct drm_crtc *crtc, struct drm_atomic_state *das)
{
- struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(das,
- crtc);
struct rkvop_crtc *rkcrtc = to_rkvop_crtc(crtc);
struct rkvop_softc *sc = rkcrtc->sc;