From patchwork Wed Nov 29 16:21:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 10082737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AB566020B for ; Wed, 29 Nov 2017 16:21:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73B1829B28 for ; Wed, 29 Nov 2017 16:21:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68C1429B2C; Wed, 29 Nov 2017 16:21:12 +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=-4.2 required=2.0 tests=BAYES_00, 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 363C229B28 for ; Wed, 29 Nov 2017 16:21:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42D136E009; Wed, 29 Nov 2017 16:21:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot0-f194.google.com (mail-ot0-f194.google.com [74.125.82.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBD9E6E009 for ; Wed, 29 Nov 2017 16:21:08 +0000 (UTC) Received: by mail-ot0-f194.google.com with SMTP id d5so3493645oti.3 for ; Wed, 29 Nov 2017 08:21:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=9KZEhrz6xCwTnTSSaZI/4Obf0SyFBVlS4zmIEVYKPRE=; b=h5Xb7JCpOkVSrxqlhIvptFFyZo2AELxMc2UJHDNH9d3A3sVLeGsWao9XaEOgNtBGue hlOtz2LtieVgyoBiHElp9aJjWdhVx9KJ15eaDUQGWRGCFmPOExG5V40Y5Ny6t/sVhuhq M9B6jHWH9rLwSXFccTlWOp7eWlvkau0ooIceec0puwysT5LK0FAh/9Cdw+x7XwBfdO0m 1KsBF3ZVFRanVbUYGGWOHxVO+zdmI1FRSn3FvPZL7rmgNVD8FUtvsXz0WLdgqrb4cXhq efPmPp7YRY9Rz4LmWfH+CAdFkbI234Wz90ABrI1ABRLqZjOs5cN4eeFetYoMyEokQg84 9luA== X-Gm-Message-State: AJaThX4sVliLA9oMZxVuU2BtyQlhg1Jd6zXU6izdfXEiW7q/KIc54yrk 8jvjQAs3EOj47eSltBJYwcvS1/4= X-Google-Smtp-Source: AGs4zMa6tfmPvXs3YYP5hTOgqE1BURNXMEdz+LiYN7TWYkImJrL5cwxnjeEvgp3/jLozLX9oNDq4CA== X-Received: by 10.157.21.49 with SMTP id u46mr2724635otf.361.1511972467428; Wed, 29 Nov 2017 08:21:07 -0800 (PST) Received: from xps15.usacommunications.tv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id g18sm877181otd.81.2017.11.29.08.21.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 08:21:06 -0800 (PST) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH hwc] drm_hwcomposer: fix warnings on unused variables and parameters Date: Wed, 29 Nov 2017 10:21:06 -0600 Message-Id: <20171129162106.10541-1-robh@kernel.org> X-Mailer: git-send-email 2.14.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP AOSP master now builds by default with -Werror, so fix all the warnings. All the warnings are related to unused variables and parameters. Signed-off-by: Rob Herring --- drmcrtc.cpp | 7 +------ drmcrtc.h | 6 ------ drmdisplaycompositor.cpp | 3 --- drmencoder.cpp | 1 - drmencoder.h | 2 -- drmhwctwo.cpp | 3 +-- glworker.cpp | 1 - platform.cpp | 4 ++-- 8 files changed, 4 insertions(+), 23 deletions(-) diff --git a/drmcrtc.cpp b/drmcrtc.cpp index c1398699d40d..1b354fe3db61 100644 --- a/drmcrtc.cpp +++ b/drmcrtc.cpp @@ -31,12 +31,7 @@ DrmCrtc::DrmCrtc(DrmResources *drm, drmModeCrtcPtr c, unsigned pipe) id_(c->crtc_id), pipe_(pipe), display_(-1), - x_(c->x), - y_(c->y), - width_(c->width), - height_(c->height), - mode_(&c->mode), - mode_valid_(c->mode_valid) { + mode_(&c->mode) { } int DrmCrtc::Init() { diff --git a/drmcrtc.h b/drmcrtc.h index 2e8c8118a21d..c5a559968b87 100644 --- a/drmcrtc.h +++ b/drmcrtc.h @@ -54,13 +54,7 @@ class DrmCrtc { unsigned pipe_; int display_; - uint32_t x_; - uint32_t y_; - uint32_t width_; - uint32_t height_; - DrmMode mode_; - bool mode_valid_; DrmProperty active_property_; DrmProperty mode_property_; diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index dceb78d452c4..acd13b834e2a 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -490,8 +490,6 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, std::vector &layers = display_comp->layers(); std::vector &comp_planes = display_comp->composition_planes(); - std::vector &pre_comp_regions = - display_comp->pre_comp_regions(); uint64_t out_fences[drm_->crtcs().size()]; DrmConnector *connector = drm_->GetConnectorForDisplay(display_); @@ -681,7 +679,6 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, } } -out: if (!ret) { uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET; if (test_only) diff --git a/drmencoder.cpp b/drmencoder.cpp index 1d4ebdc591ad..3d762f34919d 100644 --- a/drmencoder.cpp +++ b/drmencoder.cpp @@ -27,7 +27,6 @@ DrmEncoder::DrmEncoder(drmModeEncoderPtr e, DrmCrtc *current_crtc, const std::vector &possible_crtcs) : id_(e->encoder_id), crtc_(current_crtc), - type_(e->encoder_type), possible_crtcs_(possible_crtcs) { } diff --git a/drmencoder.h b/drmencoder.h index ed3c21e1923c..58ccbfbc5004 100644 --- a/drmencoder.h +++ b/drmencoder.h @@ -45,8 +45,6 @@ class DrmEncoder { uint32_t id_; DrmCrtc *crtc_; - uint32_t type_; - std::vector possible_crtcs_; }; } diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index 54824b8ce1af..5ab4595bce96 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -242,7 +242,6 @@ HWC2::Error DrmHwcTwo::HwcDisplay::RegisterVsyncCallback( HWC2::Error DrmHwcTwo::HwcDisplay::AcceptDisplayChanges() { supported(__func__); - uint32_t num_changes = 0; for (std::pair &l : layers_) l.second.accept_type_change(); return HWC2::Error::None; @@ -614,7 +613,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::SetActiveConfig(hwc2_config_t config) { HWC2::Error DrmHwcTwo::HwcDisplay::SetClientTarget(buffer_handle_t target, int32_t acquire_fence, int32_t dataspace, - hwc_region_t damage) { + hwc_region_t /*damage*/) { supported(__func__); UniqueFd uf(acquire_fence); diff --git a/glworker.cpp b/glworker.cpp index e90576a75f1a..ca726bf573ba 100644 --- a/glworker.cpp +++ b/glworker.cpp @@ -478,7 +478,6 @@ int GLWorkerCompositor::Init() { const char *egl_extensions; const char *gl_extensions; EGLint num_configs; - EGLint attribs[] = {EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE, EGL_NONE}; EGLConfig egl_config; // clang-format off diff --git a/platform.cpp b/platform.cpp index e920872fa180..56ab37e12d94 100644 --- a/platform.cpp +++ b/platform.cpp @@ -142,8 +142,8 @@ int PlanStageProtected::ProvisionPlanes( int PlanStagePrecomp::ProvisionPlanes( std::vector *composition, - std::map &layers, DrmCrtc *crtc, - std::vector *planes) { + std::map &layers, DrmCrtc * /*crtc*/, + std::vector * /*planes*/) { DrmCompositionPlane *precomp = GetPrecomp(composition); if (!precomp || precomp->source_layers().empty()) return 0;