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 <peng.p.sun@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Sun Peng 2022-04-01 16:23:41 +08:00 committed by acrnsi-robot
parent cd7448c21a
commit bfde6182d2
3 changed files with 13 additions and 7 deletions

View File

@ -1,6 +1,9 @@
/* /*
* Copyright (C) OASIS Open 2018. All rights reserved.
* Copyright (C) 2022 Intel Corporation. * Copyright (C) 2022 Intel Corporation.
* *
* SPDX-License-Identifier: BSD-3-Clause
*
* virtio-gpu device * 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_read &= ~value;
gpu->cfg.events_clear &= ~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; 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 */ /* init mutex attribute properly to avoid deadlock */
rc = pthread_mutexattr_init(&attr); rc = pthread_mutexattr_init(&attr);
if (rc) { if (rc) {
pr_err("%s: mutexattr init failed with erro %d!\n", pr_err("%s: mutexattr init failed with error %d.\n",
__func__, rc); __func__, rc);
return rc; return rc;
} }
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
if (rc) { if (rc) {
pr_err("%s: mutexattr_settype failed with error %d!\n", pr_err("%s: mutexattr_settype failed with error %d.\n",
__func__, rc); __func__, rc);
return rc; return rc;
} }
rc = pthread_mutex_init(&gpu->mtx, &attr); rc = pthread_mutex_init(&gpu->mtx, &attr);
if (rc) { 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); __func__,rc);
return rc; return rc;
} }

View File

@ -777,7 +777,7 @@ vga_port_in_handler(struct vmctx *ctx, int in, int port, int bytes,
*val = vd->vga_crtc.crtc_line_compare; *val = vd->vga_crtc.crtc_line_compare;
break; break;
default: 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); assert(0);
break; break;
} }
@ -1391,14 +1391,14 @@ vga_vbe_write(struct vmctx *ctx, int vcpu, struct vga *vga,
if (!vga->gc->gc_image->vgamode && if (!vga->gc->gc_image->vgamode &&
vga->vberegs.xres == 0 && vga->vberegs.xres == 0 &&
vga->vberegs.yres == 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->vgamode = 1;
vga->gc->gc_image->width = 0; vga->gc->gc_image->width = 0;
vga->gc->gc_image->height = 0; vga->gc->gc_image->height = 0;
} else if (vga->gc->gc_image->vgamode && } else if (vga->gc->gc_image->vgamode &&
vga->vberegs.xres != 0 && vga->vberegs.xres != 0 &&
vga->vberegs.yres != 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; vga->gc->gc_image->vgamode = 0;
} }
} }

View File

@ -2,6 +2,9 @@
* Copyright (C) 2022 Intel Corporation. * Copyright (C) 2022 Intel Corporation.
* *
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2015 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com>
* All rights reserved.
*/ */
#ifndef _VGA_H_ #ifndef _VGA_H_