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: 120028 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3254348qgn; Wed, 29 Nov 2017 08:21:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMYRSRpptRLoFaZU6DeB5eBUidc6a5Zmd1V/3bvj3JVvTwigUvJOqeRSJdhOOigi3EWOFf9t X-Received: by 10.159.216.131 with SMTP id s3mr3373638plp.252.1511972470877; Wed, 29 Nov 2017 08:21:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511972470; cv=none; d=google.com; s=arc-20160816; b=gcLNYPvTWGolFhWLrPAVjLVcf+Bf7ntTmH+WlyfXA26Z71YjvGX+um90HH5eyUHyz5 /aduCAYKxmAWFnwTU2MvH1ZRS2tLDD2Y7rVzXCmgYe79y9ts9q02J+IeHLQIpddmN1S6 SYweOlYzRlFNZvAzMmM759kMgAmQZaDKri8hSU3X0uXsT+SkcFT3ftSgPypDv2tn4/wt rtfYjZ4zL6cQi0XupAAV+Be1WKvxvZwuAdedLADZWdx/FNNvk+q0UrhWnHANUyJnp/LN TWTZ7MC3eNFakkwS33dGKQpv193TOuwIsi2OMfExTHX2J8qvmZIU0y5X6+8KELL2FTr/ fI9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=kX6VGqryGGqoYaUMmQ/9PnICy2GIo27Ke8/SEAfy/MY=; b=x2y5tzzi3Cd1S6sjwjx0jaeZXQ1UKGMB1AD0wES2MrypbhBQ1xGyXf7j0ZoieNLkTi jkpGGjJn+8iEEBHD0/dZtQd/CcvHBrlek5ANnwkU4YsKi2Iys3FzLmTq6O5V9kAaEFjf l+BsYYGPyWHONs8HSlZISN39HC8v3LI9W2FTRlLOzw13+jfmfRRyczYfE7pfM5LruAoz IlSDXl3OPSv4ijoAohnlK1El50fplca3UwoLAjyvkvngjEhu4XyA6QV1AzDWDK6tgHfm Pn/ooGitt4vjuRaoE7gHRKJgQ3+JqOH6ySQgWEOuZZYcuAXefdJSioQ7KGwRxcA+hjtT B1mA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id a8si1512275pls.356.2017.11.29.08.21.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 08:21:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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-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" 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;