Fix regression introduced by myself with the addition of da_fb_linebytes
tegra_fb was not adjusted so da_fb_linebytes was used uninitialized add tfa_fb_linebytes and match radeonfb/nouveaufb code in how we set it switch to using an initializer to hopefully avoid future errors this change doesn't need to be pulled up, as tegra_fb.c is absent in netbsd-7
This commit is contained in:
parent
31a419311f
commit
1b6aaa82cd
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tegra_drm.h,v 1.6 2015/12/22 22:10:36 jmcneill Exp $ */
|
||||
/* $NetBSD: tegra_drm.h,v 1.7 2016/12/17 12:11:38 maya Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -79,6 +79,7 @@ struct tegra_drmfb_attach_args {
|
||||
struct drm_fb_helper_surface_size tfa_fb_sizes;
|
||||
bus_space_tag_t tfa_fb_bst;
|
||||
bus_dma_tag_t tfa_fb_dmat;
|
||||
uint32_t tfa_fb_linebytes;
|
||||
};
|
||||
|
||||
struct tegra_crtc {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tegra_drm_fb.c,v 1.3 2015/11/16 21:14:33 jmcneill Exp $ */
|
||||
/* $NetBSD: tegra_drm_fb.c,v 1.4 2016/12/17 12:11:38 maya Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_drm_fb.c,v 1.3 2015/11/16 21:14:33 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_drm_fb.c,v 1.4 2016/12/17 12:11:38 maya Exp $");
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
@ -108,6 +108,7 @@ tegra_fb_probe(struct drm_fb_helper *helper,
|
||||
tfa.tfa_fb_sizes = *sizes;
|
||||
tfa.tfa_fb_bst = sc->sc_bst;
|
||||
tfa.tfa_fb_dmat = sc->sc_dmat;
|
||||
tfa.tfa_fb_linebytes = helper->fb->pitches[0];
|
||||
|
||||
helper->fbdev = config_found_ia(ddev->dev, "tegrafbbus", &tfa, NULL);
|
||||
if (helper->fbdev == NULL) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tegra_fb.c,v 1.2 2015/11/12 00:43:52 jmcneill Exp $ */
|
||||
/* $NetBSD: tegra_fb.c,v 1.3 2016/12/17 12:11:38 maya Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_fb.c,v 1.2 2015/11/12 00:43:52 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_fb.c,v 1.3 2016/12/17 12:11:38 maya Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -78,7 +78,6 @@ tegra_fb_attach(device_t parent, device_t self, void *aux)
|
||||
struct tegra_fb_softc * const sc = device_private(self);
|
||||
struct tegra_drm_softc * const drmsc = device_private(parent);
|
||||
struct tegra_drmfb_attach_args * const tfa = aux;
|
||||
struct drmfb_attach_args da;
|
||||
int error;
|
||||
|
||||
sc->sc_dev = self;
|
||||
@ -89,11 +88,14 @@ tegra_fb_attach(device_t parent, device_t self, void *aux)
|
||||
aprint_naive("\n");
|
||||
aprint_normal("\n");
|
||||
|
||||
da.da_dev = self;
|
||||
da.da_fb_helper = tfa->tfa_fb_helper;
|
||||
da.da_fb_sizes = &tfa->tfa_fb_sizes;
|
||||
da.da_fb_vaddr = sc->sc_fb->obj->dmap;
|
||||
da.da_params = &tegrafb_drmfb_params;
|
||||
const struct drmfb_attach_args da = {
|
||||
.da_dev = self,
|
||||
.da_fb_helper = tfa->tfa_fb_helper,
|
||||
.da_fb_sizes = &tfa->tfa_fb_sizes,
|
||||
.da_fb_vaddr = sc->sc_fb->obj->dmap,
|
||||
.da_fb_linebytes = tfa->tfa_fb_linebytes,
|
||||
.da_params = &tegrafb_drmfb_params,
|
||||
};
|
||||
|
||||
error = drmfb_attach(&sc->sc_drmfb, &da);
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user