Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2 Use correct linebytes.



details:   https://anonhg.NetBSD.org/src/rev/bd2737d3b3d4
branches:  trunk
changeset: 333841:bd2737d3b3d4
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Nov 18 09:28:36 2014 +0000

description:
Use correct linebytes.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c |  1 +
 sys/external/bsd/drm2/radeon/radeondrmkmsfb.c     |  7 +++----
 sys/external/bsd/drm2/radeon/radeondrmkmsfb.h     |  3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diffs (56 lines):

diff -r afe3c1352351 -r bd2737d3b3d4 sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c Tue Nov 18 09:12:30 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c Tue Nov 18 09:28:36 2014 +0000
@@ -255,6 +255,7 @@
        rfa.rfa_fb_helper = helper;
        rfa.rfa_fb_sizes = *sizes;
        rfa.rfa_fb_ptr = rbo->kptr;
+       rfa.rfa_fb_linebytes = mode_cmd.pitches[0];
 
        helper->fbdev = config_found_ia(rdev->ddev->dev, "radeonfbbus", &rfa,
            NULL);
diff -r afe3c1352351 -r bd2737d3b3d4 sys/external/bsd/drm2/radeon/radeondrmkmsfb.c
--- a/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c     Tue Nov 18 09:12:30 2014 +0000
+++ b/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c     Tue Nov 18 09:28:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeondrmkmsfb.c,v 1.4 2014/11/12 16:07:17 chs Exp $   */
+/*     $NetBSD: radeondrmkmsfb.c,v 1.5 2014/11/18 09:28:36 nonaka Exp $        */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.4 2014/11/12 16:07:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.5 2014/11/18 09:28:36 nonaka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -171,8 +171,7 @@
        prop_dictionary_set_uint32(dict, "width", sizes->fb_width);
        prop_dictionary_set_uint32(dict, "height", sizes->fb_height);
        prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp);
-       prop_dictionary_set_uint16(dict, "linebytes",
-           roundup2((sizes->fb_width * howmany(sizes->surface_bpp, 8)), 64));
+       prop_dictionary_set_uint16(dict, "linebytes", rfa->rfa_fb_linebytes);
        prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */
        CTASSERT(sizeof(uintptr_t) <= sizeof(uint64_t));
        prop_dictionary_set_uint64(dict, "virtual_address",
diff -r afe3c1352351 -r bd2737d3b3d4 sys/external/bsd/drm2/radeon/radeondrmkmsfb.h
--- a/sys/external/bsd/drm2/radeon/radeondrmkmsfb.h     Tue Nov 18 09:12:30 2014 +0000
+++ b/sys/external/bsd/drm2/radeon/radeondrmkmsfb.h     Tue Nov 18 09:28:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeondrmkmsfb.h,v 1.1 2014/07/25 12:35:03 riastradh Exp $     */
+/*     $NetBSD: radeondrmkmsfb.h,v 1.2 2014/11/18 09:28:36 nonaka Exp $        */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -39,6 +39,7 @@
        struct drm_fb_helper                    *rfa_fb_helper;
        struct drm_fb_helper_surface_size       rfa_fb_sizes;
        void                                    *rfa_fb_ptr;
+       uint32_t                                rfa_fb_linebytes;
 };
 
 #endif /* _RADEON_RADEONDRMKMS_H_ */



Home | Main Index | Thread Index | Old Index