From bfde6182d291f933520017df76eea8f488e46815 Mon Sep 17 00:00:00 2001 From: Sun Peng Date: Fri, 1 Apr 2022 16:23:41 +0800 Subject: [PATCH] dm: virtio-gpu: update copyright and license Add license information to virtio_gpu.c Fix some grammar issues. Tracked-On: #7241 Signed-off-by: Sun Peng Acked-by: Wang, Yu1 --- devicemodel/hw/pci/virtio/virtio_gpu.c | 11 +++++++---- devicemodel/hw/vga.c | 6 +++--- devicemodel/include/vga.h | 3 +++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/devicemodel/hw/pci/virtio/virtio_gpu.c b/devicemodel/hw/pci/virtio/virtio_gpu.c index 5631040ce..acb26c20c 100644 --- a/devicemodel/hw/pci/virtio/virtio_gpu.c +++ b/devicemodel/hw/pci/virtio/virtio_gpu.c @@ -1,6 +1,9 @@ /* + * Copyright (C) OASIS Open 2018. All rights reserved. * Copyright (C) 2022 Intel Corporation. * + * SPDX-License-Identifier: BSD-3-Clause + * * virtio-gpu device * */ @@ -488,7 +491,7 @@ virtio_gpu_cfgwrite(void *vdev, int offset, int size, uint32_t value) gpu->cfg.events_read &= ~value; gpu->cfg.events_clear &= ~value; } - pr_err("%s: write to read-only regisiters.\n", __func__); + pr_err("%s: write to read-only registers.\n", __func__); return 0; } @@ -1442,19 +1445,19 @@ virtio_gpu_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts) /* init mutex attribute properly to avoid deadlock */ rc = pthread_mutexattr_init(&attr); if (rc) { - pr_err("%s: mutexattr init failed with erro %d!\n", + pr_err("%s: mutexattr init failed with error %d.\n", __func__, rc); return rc; } rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); if (rc) { - pr_err("%s: mutexattr_settype failed with error %d!\n", + pr_err("%s: mutexattr_settype failed with error %d.\n", __func__, rc); return rc; } rc = pthread_mutex_init(&gpu->mtx, &attr); if (rc) { - pr_err("%s: pthread_mutex_init failed with error %d!\n", + pr_err("%s: pthread_mutex_init failed with error %d.\n", __func__,rc); return rc; } diff --git a/devicemodel/hw/vga.c b/devicemodel/hw/vga.c index 0772eac8a..68b943bfc 100644 --- a/devicemodel/hw/vga.c +++ b/devicemodel/hw/vga.c @@ -777,7 +777,7 @@ vga_port_in_handler(struct vmctx *ctx, int in, int port, int bytes, *val = vd->vga_crtc.crtc_line_compare; break; default: - pr_err("VGA CRTC: inb 0x%04x at index %d\n", port, vd->vga_crtc.crtc_index); + pr_err("VGA CRTC: port 0x%04x at index %d\n", port, vd->vga_crtc.crtc_index); assert(0); break; } @@ -1391,14 +1391,14 @@ vga_vbe_write(struct vmctx *ctx, int vcpu, struct vga *vga, if (!vga->gc->gc_image->vgamode && vga->vberegs.xres == 0 && vga->vberegs.yres == 0) { - pr_dbg("switching to VGA mode\r\n"); + pr_dbg("Switching to VGA mode\n"); vga->gc->gc_image->vgamode = 1; vga->gc->gc_image->width = 0; vga->gc->gc_image->height = 0; } else if (vga->gc->gc_image->vgamode && vga->vberegs.xres != 0 && vga->vberegs.yres != 0) { - pr_dbg("switching to VESA mode\r\n"); + pr_dbg("Switching to VESA mode\n"); vga->gc->gc_image->vgamode = 0; } } diff --git a/devicemodel/include/vga.h b/devicemodel/include/vga.h index 5bca77e92..559a7d6b5 100644 --- a/devicemodel/include/vga.h +++ b/devicemodel/include/vga.h @@ -2,6 +2,9 @@ * Copyright (C) 2022 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2015 Tycho Nightingale + * All rights reserved. */ #ifndef _VGA_H_