NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/49229: pm2fb are not attached on Sparc64 and Alpha.



The following reply was made to PR kern/49229; it has been noted by GNATS.

From: "Naruaki.Etomi" <nullnilaki%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/49229: pm2fb are not attached on Sparc64 and Alpha.
Date: Wed, 24 Sep 2014 04:36:15 +0900

 I reconsider my patch.
 
 An alternative plan:
 ==========================================================================
 >+#if BYTE_ORDER == LITTLE_ENDIAN
 >+      pci_mapreg_info(pa->pa_pc, pa->pa_tag, PM2_PCI_MEM_LE,
 >PCI_MAPREG_TYPE_MEM,
 >           &sc->sc_fb, &sc->sc_fbsize, &flags);
 >+#else
 >+        pci_mapreg_info(pa->pa_pc, pa->pa_tag, PM2_PCI_MEM_BE,
 >PCI_MAPREG_TYPE_MEM,
 >+            &sc->sc_fb, &sc->sc_fbsize, &flags);
 >+#endif
 
 OR
 
 + * most of the following was adapted from the xf86-video-glint driver's
 + * pm2_dac.c (8bpp only)
 + */
 +static void
 +pm2fb_set_dac(struct pm2fb_softc *sc, const struct videomode *mode)
 +{
 +       int t1, t2, t3, t4, stride;
 +       uint32_t vclk, tmp;
 +       uint8_t sync = 0;
 +
 +       bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_APERTURE1_CONTROL, 0);
 +       bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_APERTURE2_CONTROL, 0);
 +
 +       t1 = mode->hsync_start - mode->hdisplay;
 +       t2 = mode->vsync_start - mode->vdisplay;
 +       t3 = mode->hsync_end - mode->hsync_start;
 +       t4 = mode->vsync_end - mode->vsync_start;
 ......
 
 Adding the methods to initialize PM2_APERTURE1_CONTROL and
 PM2_APERTURE1_CONTROL2.
 https://twitter.com/nullnilaki/status/514498236711985155/photo/1
 It seems to be work fine.
 ==========================================================================
 
 Slanted at an angle of 2 degrees to the perpendicular.
 ==========================================================================
 I think that this is pm2fb_bitblt's problem.
 (I think that this is adjust routine's problem)
 
 When adjust = 1:
 
 Alpha:
 https://twitter.com/nullnilaki/status/514420973076885505/photo/1
 It seems to be work fine.
 
 Sparc64:
 https://twitter.com/nullnilaki/status/514477298993475584/photo/1
 It seems to be work wrong.
 
 I hope this will help.
 ==========================================================================
 
 --
 Naruaki.Etomi
 nullnilaki%gmail.com@localhost
 



Home | Main Index | Thread Index | Old Index