CVS commit: src/sys/arch/arm/iomd

2024-05-18 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat May 18 19:04:45 UTC 2024

Modified Files:
src/sys/arch/arm/iomd: vidc20config.c

Log Message:
s/abou/about/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/iomd/vidc20config.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/iomd/vidc20config.c
diff -u src/sys/arch/arm/iomd/vidc20config.c:1.36 src/sys/arch/arm/iomd/vidc20config.c:1.37
--- src/sys/arch/arm/iomd/vidc20config.c:1.36	Tue May 24 06:28:00 2022
+++ src/sys/arch/arm/iomd/vidc20config.c	Sat May 18 19:04:45 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vidc20config.c,v 1.36 2022/05/24 06:28:00 andvar Exp $	*/
+/*	$NetBSD: vidc20config.c,v 1.37 2024/05/18 19:04:45 andvar Exp $	*/
 
 /*
  * Copyright (c) 2001 Reinoud Zandijk
@@ -48,7 +48,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.36 2022/05/24 06:28:00 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.37 2024/05/18 19:04:45 andvar Exp $");
 
 #include 
 #include 
@@ -206,7 +206,7 @@ vidcvideo_write(u_int reg, int value)
 
 	/*
 	 * Undefine SAFER if you wish to speed things up (a little)
-	 * although this means the function will assume things abou
+	 * although this means the function will assume things about
 	 * the structure of vidc_state. i.e. the first 256 words are
 	 * the palette array
 	 */



CVS commit: src/sys/arch/arm/iomd

2024-05-18 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat May 18 19:04:45 UTC 2024

Modified Files:
src/sys/arch/arm/iomd: vidc20config.c

Log Message:
s/abou/about/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/iomd/vidc20config.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/iomd

2022-09-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Sep 27 06:14:41 UTC 2022

Modified Files:
src/sys/arch/arm/iomd: vidcaudio.c

Log Message:
malloc -> kmem


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/arm/iomd/vidcaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/iomd/vidcaudio.c
diff -u src/sys/arch/arm/iomd/vidcaudio.c:1.61 src/sys/arch/arm/iomd/vidcaudio.c:1.62
--- src/sys/arch/arm/iomd/vidcaudio.c:1.61	Wed Feb  3 14:22:21 2021
+++ src/sys/arch/arm/iomd/vidcaudio.c	Tue Sep 27 06:14:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vidcaudio.c,v 1.61 2021/02/03 14:22:21 isaki Exp $	*/
+/*	$NetBSD: vidcaudio.c,v 1.62 2022/09/27 06:14:41 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson
@@ -65,13 +65,13 @@
 
 #include 	/* proc.h */
 
-__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.61 2021/02/03 14:22:21 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.62 2022/09/27 06:14:41 skrll Exp $");
 
 #include 
 #include/* autoconfig functions */
 #include  /* device calls */
 #include 
-#include 
+#include 
 #include 	/* device calls */
 #include 
 
@@ -121,6 +121,7 @@ struct vidcaudio_softc {
 	vaddr_t	sc_poffset;
 	vaddr_t	sc_pbufsize;
 	paddr_t	*sc_ppages;
+	size_t	sc_szppages;
 	void	(*sc_pintr)(void *);
 	void	*sc_parg;
 	int	sc_pcountdown;
@@ -294,8 +295,9 @@ vidcaudio_close(void *addr)
 	DPRINTF(("DEBUG: vidcaudio_close called\n"));
 	sc = addr;
 	if (sc->sc_ppages != NULL) {
-		free(sc->sc_ppages, M_DEVBUF);
+		kmem_free(sc->sc_ppages, sc->sc_szppages * sizeof(paddr_t));
 		sc->sc_ppages = NULL;
+		sc->sc_szppages = 0;
 	}
 }
 
@@ -390,8 +392,9 @@ vidcaudio_trigger_output(void *addr, voi
 	sc->sc_pbufsize = (char *)end - (char *)start;
 	npages = sc->sc_pbufsize >> PGSHIFT;
 	if (sc->sc_ppages != NULL)
-		free(sc->sc_ppages, M_DEVBUF);
-	sc->sc_ppages = malloc(npages * sizeof(paddr_t), M_DEVBUF, M_WAITOK);
+		kmem_free(sc->sc_ppages, sc->sc_szppages);
+	sc->sc_szppages = npages * sizeof(paddr_t);
+	sc->sc_ppages = kmem_alloc(sc->sc_szppages, KM_SLEEP);
 	if (sc->sc_ppages == NULL)
 		return ENOMEM;
 	for (i = 0; i < npages; i++)



CVS commit: src/sys/arch/arm/iomd

2022-09-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Sep 27 06:14:41 UTC 2022

Modified Files:
src/sys/arch/arm/iomd: vidcaudio.c

Log Message:
malloc -> kmem


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/arm/iomd/vidcaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/iomd

2022-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat May 28 22:33:42 UTC 2022

Modified Files:
src/sys/arch/arm/iomd: vidc20config.h

Log Message:
s/heigth/height/ in a function argument name.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/iomd/vidc20config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/iomd/vidc20config.h
diff -u src/sys/arch/arm/iomd/vidc20config.h:1.7 src/sys/arch/arm/iomd/vidc20config.h:1.8
--- src/sys/arch/arm/iomd/vidc20config.h:1.7	Mon May 19 15:30:51 2008
+++ src/sys/arch/arm/iomd/vidc20config.h	Sat May 28 22:33:42 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vidc20config.h,v 1.7 2008/05/19 15:30:51 reinoud Exp $ */
+/* $NetBSD: vidc20config.h,v 1.8 2022/05/28 22:33:42 andvar Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #define _VIDC20CONFIG_H_
 
 extern int   vidcvideo_write  (u_int reg, int value);
-extern int   vidcvideo_cursor_init(int width, int heigth);
+extern int   vidcvideo_cursor_init(int width, int height);
 extern void  vidcvideo_setpalette (struct vidc_state *vidc);
 extern void  vidcvideo_stdpalette (void);
 extern void  vidcvideo_setstate   (struct vidc_state *vidc);



CVS commit: src/sys/arch/arm/iomd

2022-05-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat May 28 22:33:42 UTC 2022

Modified Files:
src/sys/arch/arm/iomd: vidc20config.h

Log Message:
s/heigth/height/ in a function argument name.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/iomd/vidc20config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/arch/arm/iomd

2012-02-14 Thread David Brownlee
On 14 February 2012 21:09, Michael  wrote:
> Hello,
>
> On Tue, 14 Feb 2012 14:25:18 +
> Nick Hudson  wrote:
>
>> On Tuesday 14 February 2012 13:11:34 Izumi Tsutsui wrote:
>> > skrll@ wrote:
>> > > Module Name:      src
>> > > Committed By:     skrll
>> > > Date:             Tue Feb 14 13:04:52 UTC 2012
>> > >
>> > > Modified Files:
>> > >   src/sys/arch/arm/iomd: vidcvideo.c
>> > >
>> > > Log Message:
>> > > Pass RI_NO_AUTO to rasops_init so that rasops doesn't attempt to allocate
>> > > memory as we're too early in kernel startup for this.
>> >
>> > I always think we should make RI_NO_AUTO default and
>> > RI_AUTO should be optional, because too many MD drivers
>> > have been trapped by this silent panic...
>>
>> Can't argue with that.
>
> Yeah. I wish there was a way to know wether we can kmem_alloc() or not.

Surely it must be possible to be able to query the kmem subsystem for
whether its too soon for kmem_alloc()?


Re: CVS commit: src/sys/arch/arm/iomd

2012-02-14 Thread Michael
Hello,

On Tue, 14 Feb 2012 14:25:18 +
Nick Hudson  wrote:

> On Tuesday 14 February 2012 13:11:34 Izumi Tsutsui wrote:
> > skrll@ wrote:
> > > Module Name:  src
> > > Committed By: skrll
> > > Date: Tue Feb 14 13:04:52 UTC 2012
> > > 
> > > Modified Files:
> > >   src/sys/arch/arm/iomd: vidcvideo.c
> > > 
> > > Log Message:
> > > Pass RI_NO_AUTO to rasops_init so that rasops doesn't attempt to allocate
> > > memory as we're too early in kernel startup for this.
> > 
> > I always think we should make RI_NO_AUTO default and
> > RI_AUTO should be optional, because too many MD drivers
> > have been trapped by this silent panic...
> 
> Can't argue with that.

Yeah. I wish there was a way to know wether we can kmem_alloc() or not.

have fun
Michael


Re: CVS commit: src/sys/arch/arm/iomd

2012-02-14 Thread Nick Hudson
On Tuesday 14 February 2012 13:11:34 Izumi Tsutsui wrote:
> skrll@ wrote:
> > Module Name:src
> > Committed By:   skrll
> > Date:   Tue Feb 14 13:04:52 UTC 2012
> > 
> > Modified Files:
> > src/sys/arch/arm/iomd: vidcvideo.c
> > 
> > Log Message:
> > Pass RI_NO_AUTO to rasops_init so that rasops doesn't attempt to allocate
> > memory as we're too early in kernel startup for this.
> 
> I always think we should make RI_NO_AUTO default and
> RI_AUTO should be optional, because too many MD drivers
> have been trapped by this silent panic...

Can't argue with that.

> 
> ---
> Izumi Tsutsui

Nick


Re: CVS commit: src/sys/arch/arm/iomd

2012-02-14 Thread Izumi Tsutsui
skrll@ wrote:

> Module Name:  src
> Committed By: skrll
> Date: Tue Feb 14 13:04:52 UTC 2012
> 
> Modified Files:
>   src/sys/arch/arm/iomd: vidcvideo.c
> 
> Log Message:
> Pass RI_NO_AUTO to rasops_init so that rasops doesn't attempt to allocate
> memory as we're too early in kernel startup for this.

I always think we should make RI_NO_AUTO default and
RI_AUTO should be optional, because too many MD drivers
have been trapped by this silent panic...

---
Izumi Tsutsui