From patchwork Fri Oct 26 19:21:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD3FB109C for ; Fri, 26 Oct 2018 19:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB28A2CBD4 for ; Fri, 26 Oct 2018 19:21:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C87082CBD9; Fri, 26 Oct 2018 19:21:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 82B662CB9A for ; Fri, 26 Oct 2018 19:21:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79C4C6E533; Fri, 26 Oct 2018 19:21:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 043456E533 for ; Fri, 26 Oct 2018 19:21:55 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id a10-v6so2523931qtp.2 for ; Fri, 26 Oct 2018 12:21:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LtZcx+CVUn7EikVnICHRi5K+TmBpVqD4Q/OjAbD6y+c=; b=ULQjmyISg5Q16TBeCAZI/UMxFlbLsFDLEwTrjSwYv5pJYbRouRkqYprQ6kyrlq66zx FAxcldImAv9J2L7h8fj/rs8VtyJs+LfI27ZtCjGKnJFEc+ufCxCmjbJhZ/xSC9/0wRoV fm9wWwfFZCeglNaUq/XH4BFsm7IX1IoDwykkDmnyLC1UA1o+6Gwqx+eXq91nluubw4QG 1Nfk6wSo9GHsgu6ub+6b83IUSlr/5mcE6EHyR9i/wYtVfv6waeP/AjW/DBhEK8dj18k6 ZtYrzNbpivQq8tAFRVDP5PgTtkpUvRvwVbvwjmNHD/Qhm0MK17DzBtqR2wy/oGU9TzYC zxqQ== X-Gm-Message-State: AGRZ1gJbEZbbua6Jvqn3JZNNIZ+jSmwE6pJGQdP/F5NzD3k4dVoZhYIs 0IkQnGM0RSTur9Opl3ZgB4g= X-Google-Smtp-Source: AJdET5dtoWYaB34zeJxWuPlKs56r5/6mta5G0ulxWFrxgvKHmQ/ENUfz4VAGLAaOIE9yvoIzSxmX7w== X-Received: by 2002:aed:20e7:: with SMTP id 94-v6mr4437312qtb.296.1540581715073; Fri, 26 Oct 2018 12:21:55 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id t128-v6sm8307402qkh.80.2018.10.26.12.21.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:21:54 -0700 (PDT) Date: Fri, 26 Oct 2018 16:21:50 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 1/6] drm/qxl: Remove trailing whitespace Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove extra tab and space to clean the checkpath.pl error. ERROR: trailing whitespace Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gpu/drm/qxl/qxl_dumb.c index c666b89eed5d..089e5fcf80e0 100644 --- a/drivers/gpu/drm/qxl/qxl_dumb.c +++ b/drivers/gpu/drm/qxl/qxl_dumb.c @@ -52,7 +52,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv, default: return -EINVAL; } - + surf.width = args->width; surf.height = args->height; surf.stride = pitch; From patchwork Fri Oct 26 19:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70DF015A7 for ; Fri, 26 Oct 2018 19:23:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FBC22CBED for ; Fri, 26 Oct 2018 19:23:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C8F52CC25; Fri, 26 Oct 2018 19:23:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CABE42CBED for ; Fri, 26 Oct 2018 19:23:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E03E06E534; Fri, 26 Oct 2018 19:23:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 334956E534 for ; Fri, 26 Oct 2018 19:23:01 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id d14-v6so2519283qto.4 for ; Fri, 26 Oct 2018 12:23:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bKcX80lQXDdmu5r13AK26upe74/ntuER0HZxy3FtDKU=; b=QRaGj+T0Er4EPaYOOSuvCi3OPXDXcLCQcwMbE4r0HSxk2skn03ff0ZEbVwMU8y9Zin wxAcxG1MAuKTuWOX4Q3dzSXPhemR39z2ZWy5iuOToRSDoFd/IQ+30LZx9UAbQUjlCvWk 0oy2V0VxfgYZE14dC7ty+rdUNrALV+J4vdxpO3fyMhBXi1ysq4PbYIL/HsJnl5FykhRD 7m0VAPRpLxNDcZgHuaIQxhTRBbablzOEZxvNea9FidUNUWBStz708ci/F3sYX8WwrDwN I3XjD0/oPBXnPk8714YarTtX3BQMTmA8IZ3pVvCgaAlrcCFWru3xgOdk8MjLTB2Tkiq0 o/Tg== X-Gm-Message-State: AGRZ1gIwM0nbHqJ6odxCKoWPc4HvFFx3Ye9dK0Dm7+c8C7O9RA/U0RRQ BUI5eIpbXUD8rL+PDKI1qmU= X-Google-Smtp-Source: AJdET5d+JxSCoTWy4Ef6KLzRw1exntUCvcSLImukirRfj/jLRN2tuEEUtXf88zACg5IeLZBxJCuGqw== X-Received: by 2002:a0c:aa4e:: with SMTP id e14-v6mr3520280qvb.158.1540581780135; Fri, 26 Oct 2018 12:23:00 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id f11-v6sm6759982qkb.47.2018.10.26.12.22.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:22:59 -0700 (PDT) Date: Fri, 26 Oct 2018 16:22:55 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 2/6] drm/qxl: Add line after variable declarations Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add whiteline after variable declarations to remove the checkpath.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_cmd.c | 4 ++++ drivers/gpu/drm/qxl/qxl_display.c | 2 ++ drivers/gpu/drm/qxl/qxl_draw.c | 2 ++ drivers/gpu/drm/qxl/qxl_dumb.c | 1 + drivers/gpu/drm/qxl/qxl_image.c | 2 ++ drivers/gpu/drm/qxl/qxl_ioctl.c | 2 ++ drivers/gpu/drm/qxl/qxl_kms.c | 1 + drivers/gpu/drm/qxl/qxl_object.c | 1 + drivers/gpu/drm/qxl/qxl_object.h | 2 ++ 9 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 208af9f37914..25ec8e6544ee 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -84,6 +84,7 @@ static int qxl_check_header(struct qxl_ring *ring) int ret; struct qxl_ring_header *header = &(ring->ring->header); unsigned long flags; + spin_lock_irqsave(&ring->lock, flags); ret = header->prod - header->cons < header->num_items; if (ret == 0) @@ -97,6 +98,7 @@ int qxl_check_idle(struct qxl_ring *ring) int ret; struct qxl_ring_header *header = &(ring->ring->header); unsigned long flags; + spin_lock_irqsave(&ring->lock, flags); ret = header->prod == header->cons; spin_unlock_irqrestore(&ring->lock, flags); @@ -110,6 +112,7 @@ int qxl_ring_push(struct qxl_ring *ring, uint8_t *elt; int idx, ret; unsigned long flags; + spin_lock_irqsave(&ring->lock, flags); if (header->prod - header->cons == header->num_items) { header->notify_on_cons = header->cons + 1; @@ -156,6 +159,7 @@ static bool qxl_ring_pop(struct qxl_ring *ring, volatile uint8_t *ring_elt; int idx; unsigned long flags; + spin_lock_irqsave(&ring->lock, flags); if (header->cons == header->prod) { header->notify_on_prod = header->cons + 1; diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 87d16a0ce01e..b7421dcdeeb6 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -259,6 +259,7 @@ static int qxl_add_common_modes(struct drm_connector *connector, struct drm_device *dev = connector->dev; struct drm_display_mode *mode = NULL; int i; + for (i = 0; i < ARRAY_SIZE(common_modes); i++) { mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false); @@ -315,6 +316,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc, oldcount = qdev->monitors_config->count; if (crtc->state->active) { struct drm_display_mode *mode = &crtc->mode; + head.width = mode->hdisplay; head.height = mode->vdisplay; head.x = crtc->x; diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c index cc5b32e749ce..ed08e9ec4827 100644 --- a/drivers/gpu/drm/qxl/qxl_draw.c +++ b/drivers/gpu/drm/qxl/qxl_draw.c @@ -168,6 +168,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, int ret; struct qxl_drm_image *dimage; struct qxl_bo *palette_bo = NULL; + if (stride == 0) stride = depth * width / 8; @@ -214,6 +215,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, if (depth == 1) { void *ptr; + ret = qxl_palette_create_1bit(palette_bo, release, qxl_fb_image); ptr = qxl_bo_kmap_atomic_page(qdev, dimage->bo, 0); diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gpu/drm/qxl/qxl_dumb.c index 089e5fcf80e0..e3765739c396 100644 --- a/drivers/gpu/drm/qxl/qxl_dumb.c +++ b/drivers/gpu/drm/qxl/qxl_dumb.c @@ -38,6 +38,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv, int r; struct qxl_surface surf; uint32_t pitch, format; + pitch = args->width * ((args->bpp + 1) / 8); args->size = pitch * args->height; args->size = ALIGN(args->size, PAGE_SIZE); diff --git a/drivers/gpu/drm/qxl/qxl_image.c b/drivers/gpu/drm/qxl/qxl_image.c index 7fbcc35e8ad3..13b9a18ccde5 100644 --- a/drivers/gpu/drm/qxl/qxl_image.c +++ b/drivers/gpu/drm/qxl/qxl_image.c @@ -136,6 +136,7 @@ qxl_image_init_helper(struct qxl_device *qdev, int remain; int page; int size; + if (stride == linesize && chunk_stride == stride) { remain = linesize * height; page = 0; @@ -163,6 +164,7 @@ qxl_image_init_helper(struct qxl_device *qdev, } } else { unsigned page_base, page_offset, out_offset; + for (i = 0 ; i < height ; ++i) { i_data = (void *)data + i * stride; remain = linesize; diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c index 6cc9f3367fa0..6e828158bcb0 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c @@ -85,6 +85,7 @@ static void apply_reloc(struct qxl_device *qdev, struct qxl_reloc_info *info) { void *reloc_page; + reloc_page = qxl_bo_kmap_atomic_page(qdev, info->dst_bo, info->dst_offset & PAGE_MASK); *(uint64_t *)(reloc_page + (info->dst_offset & ~PAGE_MASK)) = qxl_bo_physical_address(qdev, info->src_bo, @@ -189,6 +190,7 @@ static int qxl_process_single_command(struct qxl_device *qdev, { struct qxl_drawable *draw = fb_cmd; + draw->mm_time = qdev->rom->mm_clock; } diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index e25c589d5f50..d1ba0ab1be82 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -92,6 +92,7 @@ void qxl_reinit_memslots(struct qxl_device *qdev) static void qxl_gc_work(struct work_struct *work) { struct qxl_device *qdev = container_of(work, struct qxl_device, gc_work); + qxl_garbage_collect(qdev); } diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 6a30196e9d6c..e1f2404b8f6f 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -335,6 +335,7 @@ void qxl_bo_fini(struct qxl_device *qdev) int qxl_bo_check_id(struct qxl_device *qdev, struct qxl_bo *bo) { int ret; + if (bo->type == QXL_GEM_DOMAIN_SURFACE && bo->surface_id == 0) { /* allocate a surface id for this surface now */ ret = qxl_surface_id_alloc(qdev, bo); diff --git a/drivers/gpu/drm/qxl/qxl_object.h b/drivers/gpu/drm/qxl/qxl_object.h index 0374fd93f4d6..b40fc9a10406 100644 --- a/drivers/gpu/drm/qxl/qxl_object.h +++ b/drivers/gpu/drm/qxl/qxl_object.h @@ -35,6 +35,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait) if (unlikely(r != 0)) { if (r != -ERESTARTSYS) { struct drm_device *ddev = bo->gem_base.dev; + dev_err(ddev->dev, "%p reserve failed\n", bo); } return r; @@ -71,6 +72,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type, if (unlikely(r != 0)) { if (r != -ERESTARTSYS) { struct drm_device *ddev = bo->gem_base.dev; + dev_err(ddev->dev, "%p reserve failed for wait\n", bo); } From patchwork Fri Oct 26 19:23:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49A7E109C for ; Fri, 26 Oct 2018 19:23:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 383C3283C7 for ; Fri, 26 Oct 2018 19:23:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3688B28541; Fri, 26 Oct 2018 19:23:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E424283C7 for ; Fri, 26 Oct 2018 19:23:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3D426E535; Fri, 26 Oct 2018 19:23:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CDB66E535 for ; Fri, 26 Oct 2018 19:23:22 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id l11-v6so1895300qtf.7 for ; Fri, 26 Oct 2018 12:23:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ephMQtX6szxfy2t+x3mOkjChAL/PNR6I3wnsrbkyA5A=; b=DLVgOr38+PBs1fev0lYJJ1/5WiGpq68uDg87YmEwpqLppV1693z6sC+vHafYxW6E09 0mca17K5CrNS9b01ssYeB7AMkFP51Wt6PT9WO0t/fbN31kbwaQdiPdcRhCSguE0clko5 Hl53QuFs22qfzM1D97bAaWIIKo8yY/u1IvTLc6IPMI9GczJHY5uzfadvjh7A4sFP4+gC pSSn+XfHCBJzlTWf3ls/zbqvJmAiIBu1oschHow2hdK1X4PqMgv6O0clFLodBlSdnuTV l2+pMGPBBwQOrggqN5OQ40JC9wzefnnYMcvzKNomVFTvSv2qkMdyisRPX1hMw+8a/7k9 ovGQ== X-Gm-Message-State: AGRZ1gIBdz6/+Bd3k2kOWB2JA+Hww9vhx6wq2pxO6Z+5g7ScOzFZUI9Y tFRPKkIIgndI4zsYpWs9aio= X-Google-Smtp-Source: AJdET5d1pYi3SNmyoRhI/VFEGNUrCuynAv89DQzO2lnE6XyY7vh4ri0BEYc2YMNPRm9KdI0ZxYS6yQ== X-Received: by 2002:ac8:6a0b:: with SMTP id t11-v6mr4555894qtr.360.1540581801109; Fri, 26 Oct 2018 12:23:21 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id x65-v6sm14647353qkg.72.2018.10.26.12.23.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:23:20 -0700 (PDT) Date: Fri, 26 Oct 2018 16:23:16 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 3/6] drm/qxl: Remove exceding whiteline Message-ID: <5b95e1d4d515d02d01b829ddc5b3ca80af29e2e2.1540579956.git.shayenneluzmoura@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove extra whiteline to clean the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_cmd.c | 1 - drivers/gpu/drm/qxl/qxl_debugfs.c | 1 - drivers/gpu/drm/qxl/qxl_dev.h | 1 - drivers/gpu/drm/qxl/qxl_display.c | 1 - drivers/gpu/drm/qxl/qxl_draw.c | 1 - drivers/gpu/drm/qxl/qxl_drv.h | 3 --- drivers/gpu/drm/qxl/qxl_kms.c | 1 - drivers/gpu/drm/qxl/qxl_object.c | 2 -- drivers/gpu/drm/qxl/qxl_prime.c | 1 - drivers/gpu/drm/qxl/qxl_release.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 2 -- 11 files changed, 15 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 25ec8e6544ee..6ec4b84a6bd4 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -369,7 +369,6 @@ void qxl_io_flush_surfaces(struct qxl_device *qdev) wait_for_io_cmd(qdev, 0, QXL_IO_FLUSH_SURFACES_ASYNC); } - void qxl_io_destroy_primary(struct qxl_device *qdev) { wait_for_io_cmd(qdev, 0, QXL_IO_DESTROY_PRIMARY_ASYNC); diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index 15c84068d3fb..8c35b3433f00 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -34,7 +34,6 @@ #include "qxl_drv.h" #include "qxl_object.h" - #if defined(CONFIG_DEBUG_FS) static int qxl_debugfs_irq_received(struct seq_file *m, void *data) diff --git a/drivers/gpu/drm/qxl/qxl_dev.h b/drivers/gpu/drm/qxl/qxl_dev.h index 94c5aec71920..a0ee41632d7e 100644 --- a/drivers/gpu/drm/qxl/qxl_dev.h +++ b/drivers/gpu/drm/qxl/qxl_dev.h @@ -28,7 +28,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifndef H_QXL_DEV #define H_QXL_DEV diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index b7421dcdeeb6..f88dbfa4656a 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -960,7 +960,6 @@ static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector) return &qxl_output->enc; } - static const struct drm_encoder_helper_funcs qxl_enc_helper_funcs = { }; diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c index ed08e9ec4827..a41d48eb1374 100644 --- a/drivers/gpu/drm/qxl/qxl_draw.c +++ b/drivers/gpu/drm/qxl/qxl_draw.c @@ -342,7 +342,6 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev, if (ret) goto out_release_backoff; - ret = qxl_image_init(qdev, release, dimage, surface_base, left, top, width, height, depth, stride); qxl_bo_kunmap(bo); diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 8ff70a7281a7..4b90f9bd7280 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -23,7 +23,6 @@ * Alon Levy */ - #ifndef QXL_DRV_H #define QXL_DRV_H @@ -133,7 +132,6 @@ struct qxl_mman { struct ttm_bo_device bdev; }; - struct qxl_memslot { uint8_t generation; uint64_t start_phys_addr; @@ -372,7 +370,6 @@ int qxl_mode_dumb_mmap(struct drm_file *filp, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); - /* qxl ttm */ int qxl_ttm_init(struct qxl_device *qdev); void qxl_ttm_fini(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index d1ba0ab1be82..f6975d7c7d10 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -285,7 +285,6 @@ int qxl_device_init(struct qxl_device *qdev, (unsigned long)qdev->surfaceram_base, (unsigned long)qdev->surfaceram_size); - INIT_WORK(&qdev->gc_work, qxl_gc_work); return 0; diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index e1f2404b8f6f..18e67903b01b 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -74,7 +74,6 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) } } - int qxl_bo_create(struct qxl_device *qdev, unsigned long size, bool kernel, bool pinned, u32 domain, struct qxl_surface *surf, @@ -266,7 +265,6 @@ static int __qxl_bo_unpin(struct qxl_bo *bo) return r; } - /* * Reserve the BO before pinning the object. If the BO was reserved * beforehand, use the internal version directly __qxl_bo_pin. diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl_prime.c index 9f029dda1f07..a55dece118b2 100644 --- a/drivers/gpu/drm/qxl/qxl_prime.c +++ b/drivers/gpu/drm/qxl/qxl_prime.c @@ -38,7 +38,6 @@ void qxl_gem_prime_unpin(struct drm_gem_object *obj) WARN_ONCE(1, "not implemented"); } - struct sg_table *qxl_gem_prime_get_sg_table(struct drm_gem_object *obj) { WARN_ONCE(1, "not implemented"); diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index a8d5457a1af9..3813ec198900 100644 --- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -282,7 +282,6 @@ void qxl_release_backoff_reserve_list(struct qxl_release *release) ttm_eu_backoff_reservation(&release->ticket, &release->bos); } - int qxl_alloc_surface_release_reserved(struct qxl_device *qdev, enum qxl_surface_cmd_type surface_cmd_type, struct qxl_release *create_rel, diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 86a1fb32f6db..1824ff3ef2a5 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -331,7 +331,6 @@ static int qxl_bo_move(struct ttm_buffer_object *bo, bool evict, if (ret) return ret; - if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { qxl_move_null(bo, new_mem); return 0; @@ -418,7 +417,6 @@ void qxl_ttm_fini(struct qxl_device *qdev) DRM_INFO("qxl: ttm finalized\n"); } - #define QXL_DEBUGFS_MEM_TYPES 2 #if defined(CONFIG_DEBUG_FS) From patchwork Fri Oct 26 19:23:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 608C5109C for ; Fri, 26 Oct 2018 19:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF532B5D7 for ; Fri, 26 Oct 2018 19:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 417A32BEEF; Fri, 26 Oct 2018 19:24:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9AF5E2BB05 for ; Fri, 26 Oct 2018 19:23:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A30536E536; Fri, 26 Oct 2018 19:23:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCB1A6E536 for ; Fri, 26 Oct 2018 19:23:56 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id p3-v6so1373409qkb.5 for ; Fri, 26 Oct 2018 12:23:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0sRGfOrS7j7KNmQkSeou1HwAcHYhY3KQCIvUbukYRWQ=; b=nuW6yTRL4GW+Cj2UdVTgwa1VNrYwOJSZdzY1wWwxN5aYzsUzgO3ZyNG6LF2jRzvtXf 9kujZpZm3PsVMRViTs//tjo40yxQGVCWd9PefBf6SbRpMW9uBGvr3yU9H3irJLQvosUf i+eGNY+e4sY2GE9ARt0oFe1lYXVAnr1FQtPZuCxMgMsRMGhRfJEyT7mAmmaRWO8vAJMP I7OrXWTpolRHrH8F7v2D2pqxBusMEzE5lptwOPq/Zeakp+4evSqwR6t7J6FLASuHVaCx C0rTU2cjQA+4o0q/Tea85B9rhNkBAOWQLvJE0ZGwQV5IFtIMBtK+BRGAI+mzRAV69Quv SEUw== X-Gm-Message-State: AGRZ1gKTc2phwfZ6NfaP2xDtYfTkTxN7/nLqx/m+tN5U3uP77e0jSqVK a5qLhmNi2ul6OOqKv/my4hk= X-Google-Smtp-Source: AJdET5cNpPRRtuWunWA70eRRhFJB0xgqN6jHsEwLvdrjchHkjJZSNBwUhsW6OptYcfcZUz7AMEWTmg== X-Received: by 2002:a37:c94:: with SMTP id 142-v6mr4010310qkm.51.1540581834413; Fri, 26 Oct 2018 12:23:54 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id z3-v6sm8607898qka.61.2018.10.26.12.23.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:23:53 -0700 (PDT) Date: Fri, 26 Oct 2018 16:23:49 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 4/6] drm/qxl: Use 'unsigned int' instead of 'usigned' Message-ID: <52604806eb18bc25e7e429f5b229fe8c1d271b5c.1540579956.git.shayenneluzmoura@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use 'usigned int' instead of 'usigned' to remove the checkpath.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_cmd.c | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- drivers/gpu/drm/qxl/qxl_display.c | 12 ++++++------ drivers/gpu/drm/qxl/qxl_draw.c | 8 ++++---- drivers/gpu/drm/qxl/qxl_drv.h | 18 +++++++++--------- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++-- drivers/gpu/drm/qxl/qxl_image.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +++++----- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 6ec4b84a6bd4..dffc5093ff16 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -376,7 +376,7 @@ void qxl_io_destroy_primary(struct qxl_device *qdev) } void qxl_io_create_primary(struct qxl_device *qdev, - unsigned offset, struct qxl_bo *bo) + unsigned int offset, struct qxl_bo *bo) { struct qxl_surface_create *create; diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index 8c35b3433f00..118422549828 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -101,9 +101,9 @@ qxl_debugfs_init(struct drm_minor *minor) int qxl_debugfs_add_files(struct qxl_device *qdev, struct drm_info_list *files, - unsigned nfiles) + unsigned int nfiles) { - unsigned i; + unsigned int i; for (i = 0; i < qdev->debugfs_count; i++) { if (qdev->debugfs[i].files == files) { diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index f88dbfa4656a..5b00e0f26de1 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -253,8 +253,8 @@ static struct mode_size { }; static int qxl_add_common_modes(struct drm_connector *connector, - unsigned pwidth, - unsigned pheight) + unsigned int pwidth, + unsigned int pheight) { struct drm_device *dev = connector->dev; struct drm_display_mode *mode = NULL; @@ -393,9 +393,9 @@ static const struct drm_crtc_funcs qxl_crtc_funcs = { static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb, struct drm_file *file_priv, - unsigned flags, unsigned color, + unsigned int flags, unsigned int color, struct drm_clip_rect *clips, - unsigned num_clips) + unsigned int num_clips) { /* TODO: vmwgfx where this was cribbed from had locking. Why? */ struct qxl_device *qdev = fb->dev->dev_private; @@ -919,8 +919,8 @@ static int qdev_crtc_init(struct drm_device *dev, int crtc_id) static int qxl_conn_get_modes(struct drm_connector *connector) { - unsigned pwidth = 1024; - unsigned pheight = 768; + unsigned int pwidth = 1024; + unsigned int pheight = 768; int ret = 0; ret = qxl_add_monitors_config_modes(connector, &pwidth, &pheight); diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c index a41d48eb1374..c34e45662965 100644 --- a/drivers/gpu/drm/qxl/qxl_draw.c +++ b/drivers/gpu/drm/qxl/qxl_draw.c @@ -25,7 +25,7 @@ static int alloc_clips(struct qxl_device *qdev, struct qxl_release *release, - unsigned num_clips, + unsigned int num_clips, struct qxl_bo **clips_bo) { int size = sizeof(struct qxl_clip_rects) + sizeof(struct qxl_rect) * num_clips; @@ -37,7 +37,7 @@ static int alloc_clips(struct qxl_device *qdev, * the qxl_clip_rects. This is *not* the same as the memory allocated * on the device, it is offset to qxl_clip_rects.chunk.data */ static struct qxl_rect *drawable_set_clipping(struct qxl_device *qdev, - unsigned num_clips, + unsigned int num_clips, struct qxl_bo *clips_bo) { struct qxl_clip_rects *dev_clips; @@ -266,9 +266,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, void qxl_draw_dirty_fb(struct qxl_device *qdev, struct drm_framebuffer *fb, struct qxl_bo *bo, - unsigned flags, unsigned color, + unsigned int flags, unsigned int color, struct drm_clip_rect *clips, - unsigned num_clips, int inc) + unsigned int num_clips, int inc) { /* * TODO: if flags & DRM_MODE_FB_DIRTY_ANNOTATE_FILL then we should diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 4b90f9bd7280..d78bcb95df3e 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -82,7 +82,7 @@ struct qxl_bo { struct ttm_placement placement; struct ttm_buffer_object tbo; struct ttm_bo_kmap_obj kmap; - unsigned pin_count; + unsigned int pin_count; void *kptr; int type; @@ -189,12 +189,12 @@ struct qxl_draw_fill { */ struct qxl_debugfs { struct drm_info_list *files; - unsigned num_files; + unsigned int num_files; }; int qxl_debugfs_add_files(struct qxl_device *rdev, struct drm_info_list *files, - unsigned nfiles); + unsigned int nfiles); int qxl_debugfs_fence_init(struct qxl_device *rdev); struct qxl_device; @@ -252,7 +252,7 @@ struct qxl_device { atomic_t irq_received_display; atomic_t irq_received_cursor; atomic_t irq_received_io_cmd; - unsigned irq_received_error; + unsigned int irq_received_error; wait_queue_head_t display_event; wait_queue_head_t cursor_event; wait_queue_head_t io_cmd_event; @@ -260,7 +260,7 @@ struct qxl_device { /* debugfs */ struct qxl_debugfs debugfs[QXL_DEBUGFS_MAX_COMPONENTS]; - unsigned debugfs_count; + unsigned int debugfs_count; struct mutex update_area_mutex; @@ -395,7 +395,7 @@ void qxl_update_screen(struct qxl_device *qxl); /* qxl io operations (qxl_cmd.c) */ void qxl_io_create_primary(struct qxl_device *qdev, - unsigned offset, + unsigned int offset, struct qxl_bo *bo); void qxl_io_destroy_primary(struct qxl_device *qdev); void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id); @@ -446,9 +446,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, void qxl_draw_dirty_fb(struct qxl_device *qdev, struct drm_framebuffer *fb, struct qxl_bo *bo, - unsigned flags, unsigned color, + unsigned int flags, unsigned int color, struct drm_clip_rect *clips, - unsigned num_clips, int inc); + unsigned int num_clips, int inc); void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec); @@ -493,7 +493,7 @@ bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj); int qxl_debugfs_add_files(struct qxl_device *qdev, struct drm_info_list *files, - unsigned nfiles); + unsigned int nfiles); int qxl_surface_id_alloc(struct qxl_device *qdev, struct qxl_bo *surf); diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c index 2294b7f14fdf..7e047c985ea6 100644 --- a/drivers/gpu/drm/qxl/qxl_fb.c +++ b/drivers/gpu/drm/qxl/qxl_fb.c @@ -134,9 +134,9 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev, */ static int qxlfb_framebuffer_dirty(struct drm_framebuffer *fb, struct drm_file *file_priv, - unsigned flags, unsigned color, + unsigned int flags, unsigned int color, struct drm_clip_rect *clips, - unsigned num_clips) + unsigned int num_clips) { struct qxl_device *qdev = fb->dev->dev_private; struct fb_info *info = qdev->fb_helper.fbdev; diff --git a/drivers/gpu/drm/qxl/qxl_image.c b/drivers/gpu/drm/qxl/qxl_image.c index 13b9a18ccde5..43688ecdd8a0 100644 --- a/drivers/gpu/drm/qxl/qxl_image.c +++ b/drivers/gpu/drm/qxl/qxl_image.c @@ -163,7 +163,7 @@ qxl_image_init_helper(struct qxl_device *qdev, page++; } } else { - unsigned page_base, page_offset, out_offset; + unsigned int page_base, page_offset, out_offset; for (i = 0 ; i < height ; ++i) { i_data = (void *)data + i * stride; diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 18e67903b01b..f67a3c535afb 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -54,7 +54,7 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) { u32 c = 0; u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0; - unsigned i; + unsigned int i; qbo->placement.placement = qbo->placements; qbo->placement.busy_placement = qbo->placements; diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 1824ff3ef2a5..559a10113837 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -174,7 +174,7 @@ static int qxl_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, man->default_caching = TTM_PL_FLAG_CACHED; break; default: - DRM_ERROR("Unsupported memory type %u\n", (unsigned)type); + DRM_ERROR("Unsupported memory type %u\n", (unsigned int)type); return -EINVAL; } return 0; @@ -400,11 +400,11 @@ int qxl_ttm_init(struct qxl_device *qdev) return r; } DRM_INFO("qxl: %uM of VRAM memory size\n", - (unsigned)qdev->vram_size / (1024 * 1024)); + (unsigned int)qdev->vram_size / (1024 * 1024)); DRM_INFO("qxl: %luM of IO pages memory ready (VRAM domain)\n", - ((unsigned)num_io_pages * PAGE_SIZE) / (1024 * 1024)); + ((unsigned int)num_io_pages * PAGE_SIZE) / (1024 * 1024)); DRM_INFO("qxl: %uM of Surface memory size\n", - (unsigned)qdev->surfaceram_size / (1024 * 1024)); + (unsigned int)qdev->surfaceram_size / (1024 * 1024)); return 0; } @@ -441,7 +441,7 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev) #if defined(CONFIG_DEBUG_FS) static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES]; static char qxl_mem_types_names[QXL_DEBUGFS_MEM_TYPES][32]; - unsigned i; + unsigned int i; for (i = 0; i < QXL_DEBUGFS_MEM_TYPES; i++) { if (i == 0) From patchwork Fri Oct 26 19:24:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A36A15A7 for ; Fri, 26 Oct 2018 19:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6940B2B5D7 for ; Fri, 26 Oct 2018 19:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CD5B2BEEF; Fri, 26 Oct 2018 19:24:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 05B022B5D7 for ; Fri, 26 Oct 2018 19:24:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38F696E53E; Fri, 26 Oct 2018 19:24:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 374F16E53E for ; Fri, 26 Oct 2018 19:24:24 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id l11-v6so1899184qtf.7 for ; Fri, 26 Oct 2018 12:24:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hCzofeQ0bxOb9JH+yn6Hps680QgMg5RDZ0Eg84Xgy8k=; b=LYULBhVCcoKwWAQIVVQhuPI7pytKFf/ES4jsIB0lTrZrtI4/bPlks9hYJ+6AdYbtlX Mn1IcNz2SwdyJ6ok3T3rJSuyElq8MwOqD7HNorMqN9+GlR2WYo8VUCF/wG5my1z0Puyg 3xcQqxq7EnLvT1xFHdyRCwi17sAiTqJeGLzgxUn33X4pLyIjBOMZP9cFiybNTBZTAldA c2x/oycsUn0Yu5OlGrb4NHjU7L5RGKi6uN9NYpIp1iUxiPbGPAZi9w/GaIXA984urnfF ZVDgbm4LFBzgddQ1acXK+YqKViZPs2dXCYYKgPjce3KLkDSu7xIyXpv8ioBOwf6QzE+L FS0A== X-Gm-Message-State: AGRZ1gIxakBGH1AMSOUJg7pdkFTsUYztIirmeazylXcmW1X2LB6KE6BR 0dUgHDc3rxCnPF1Agspo60k= X-Google-Smtp-Source: AJdET5cA77NvhwmDWBKQL+YVXhgOjk7yrmNKulc0yDgRbA8J84aDkx5uxD5I91GXXaHlbsex1vc2XA== X-Received: by 2002:a0c:948e:: with SMTP id j14mr4501328qvj.155.1540581863311; Fri, 26 Oct 2018 12:24:23 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id y144-v6sm4080661qka.7.2018.10.26.12.24.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:24:22 -0700 (PDT) Date: Fri, 26 Oct 2018 16:24:18 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 5/6] drm/qxl: Add space before open parentheses Message-ID: <1ab3ba05c140aae01bde66f73ff1f3b78bf7dfb3.1540579956.git.shayenneluzmoura@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add space to remove checkpath.pl error: ERROR: space required before the open parenthesis '(' Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 5b00e0f26de1..2ce9a8dcec84 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -940,8 +940,8 @@ static enum drm_mode_status qxl_conn_mode_valid(struct drm_connector *connector, /* TODO: is this called for user defined modes? (xrandr --add-mode) * TODO: check that the mode fits in the framebuffer */ - if(qdev->monitors_config_width == mode->hdisplay && - qdev->monitors_config_height == mode->vdisplay) + if (qdev->monitors_config_width == mode->hdisplay && + qdev->monitors_config_height == mode->vdisplay) return MODE_OK; for (i = 0; i < ARRAY_SIZE(common_modes); i++) { From patchwork Fri Oct 26 19:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10657757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAD4017DE for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBB9D286F9 for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFADA2BEEF; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A3642CB8D for ; Fri, 26 Oct 2018 19:25:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDBBB6E53C; Fri, 26 Oct 2018 19:25:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B0226E53C for ; Fri, 26 Oct 2018 19:25:04 +0000 (UTC) Received: by mail-qk1-x743.google.com with SMTP id v68-v6so1374361qka.2 for ; Fri, 26 Oct 2018 12:25:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oG0AzlyfGvjB8pHJ3pxUdHABNxHH12Ws4GlnVqXoYBM=; b=EgGfNVvS1P4F1bL7v90qsZdN+uwMmn8NzQd62wTRALY++w+xUwat2HO070dk0gsJml 0eo1iOxdwn798c3bB9JJF+Nb2FMhw2Q//xgfa+x1MADpB6Rr7iIKicYXVdrIPbzm5xPs efws5Y1dRxvedsN072+1Ja3OTvsl7Ws1dVLmqb7jZVMHMFwquGFy0oukvofS9tIY4Yyo Gnu05yJ0OTYZ0A3Bgwzj9UAIXUvONoKcTDL6Ef3eMEK/9pbUj4QTivpuM/gsuu7R2kwr 0Weq/o3fIvPPeIfFOCmJC9ZwvzGpOLCeRLj12RYdKba7LC2cyelxNsIZqbJ65YInAaUY gm8Q== X-Gm-Message-State: AGRZ1gKTc7dUXLFMMJjFmx5Drg55ArlIizZa2j7QDi0RpGLctUogB8g1 rHqqpzRQYpFeY/IXL3NgQZQ= X-Google-Smtp-Source: AJdET5e/a+P/YAVjVA5hPQoWWhlMs8VAL4faMnzQMs57K1/qyTlhyrjSkwADiqx7A+X5laisg6Xh1Q== X-Received: by 2002:a37:5003:: with SMTP id e3-v6mr4397179qkb.102.1540581903262; Fri, 26 Oct 2018 12:25:03 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id c79-v6sm11289917qka.83.2018.10.26.12.25.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 12:25:02 -0700 (PDT) Date: Fri, 26 Oct 2018 16:24:58 -0300 From: Shayenne da Luz Moura To: Dave Airlie , Gerd Hoffmann , David Airlie Subject: [PATCH 6/6] drm/qxl: Use 'unsigned int' instead of 'bool' Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use 'unsigned int' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check: CHECK: Avoid using bool structure members because of possible alignment issues Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/qxl/qxl_drv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index d78bcb95df3e..14d3fa855708 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -88,10 +88,10 @@ struct qxl_bo { /* Constant after initialization */ struct drm_gem_object gem_base; - bool is_primary; /* is this now a primary surface */ - bool is_dumb; + unsigned int is_primary:1; /* is this now a primary surface */ + unsigned int is_dumb:1; struct qxl_bo *shadow; - bool hw_surf_alloc; + unsigned int hw_surf_alloc:1; struct qxl_surface surf; uint32_t surface_id; struct qxl_release *surf_create; @@ -128,7 +128,7 @@ struct qxl_output { struct qxl_mman { struct ttm_bo_global_ref bo_global_ref; struct drm_global_reference mem_global_ref; - bool mem_global_referenced; + unsigned int mem_global_referenced:1; struct ttm_bo_device bdev; }; @@ -229,7 +229,7 @@ struct qxl_device { struct qxl_ram_header *ram_header; - bool primary_created; + unsigned int primary_created:1; struct qxl_memslot *mem_slots; uint8_t n_mem_slots;