From patchwork Tue Mar 6 20:28:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 10262881 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 33F25602BD for ; Tue, 6 Mar 2018 20:29:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2437C2918D for ; Tue, 6 Mar 2018 20:29:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1894029191; Tue, 6 Mar 2018 20:29: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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 906CF2918D for ; Tue, 6 Mar 2018 20:29:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC0E96E30C; Tue, 6 Mar 2018 20:29:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id F335E6E30C for ; Tue, 6 Mar 2018 20:29:05 +0000 (UTC) Received: by mail-pl0-x244.google.com with SMTP id s13-v6so12527065plq.6 for ; Tue, 06 Mar 2018 12:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=smeLasOiN5CgI00xkS6fr2vdVTTRrib/DgSyGXHR8I4=; b=a8TnzIxa1g91BrP3ROAMIldd1PPMZCm9U0iNPu7T9U+skX7FZCoXvTyjSuLdEpS62b Ejb1yYu2OImjRPTXivgYFp4kONM+rLOL4N9u1BvYMDQp1nEW6T7sLdQ+h+FHdN7/R21x VpCNXVX2sXyh9xkA4cmec/QN8v8mnPWQ+/SSA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=smeLasOiN5CgI00xkS6fr2vdVTTRrib/DgSyGXHR8I4=; b=ShfE08qokcT+6AIqbKHeLX16dfWV4kWt1nr/eZj+iqb2nTPHwZOu23rsJ2Frl3FPjC O5qI2vJ4SZUp7M/bPjxoSK9DbDquqGlTwDycDVqdvOGjPyNRaCJv2YVzqEOXNLXjb/Ro lYAIv7fsXzop6RxzbOf4+Hxtue9S/0tKWgJD4DnzHrti9UlsWiWnMPlSek8GAiq76Ztl q/rM/7QhcL/HCteWlm2caWthYpS0dUDYBXjrvKBpCjbVX2byvg292pD3X6+W/UYy4CzZ MXY2OEUy5A98hT/eMNxzjW/k2XySvX/9C5dA64YXFo3LukutlRb5mcd2poKGP+L8Bcq3 VJcA== X-Gm-Message-State: APf1xPBWOUbhPeexOS8569h6ZtcVlVh/WF1lw3r41v/jb8fbOaNUr9dF ZENT1iIgzRcM10m4WL9CLf/LqKGPPz0= X-Google-Smtp-Source: AG47ELuNsrEubkumELHDWb3SSl+/3T8XzIk3oZ02hxujDtBGGFKNP+uccPYGJQh43myeU/pXRdWDGg== X-Received: by 2002:a17:902:5609:: with SMTP id h9-v6mr17804216pli.302.1520368144695; Tue, 06 Mar 2018 12:29:04 -0800 (PST) Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id 125sm30180727pff.114.2018.03.06.12.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Mar 2018 12:29:03 -0800 (PST) From: John Stultz To: dri-devel Subject: [RFC][PATCH] libdrm: gralloc_handle.h: Fix build issue with Android Date: Tue, 6 Mar 2018 12:28:58 -0800 Message-Id: <1520368138-7500-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 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: Robert Foss MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP In trying to integrate the new gralloc_handle.h with the drm_hwcomposer, I started seeing the following compilation errors: In file included from external/drm_hwcomposer/platformdrmgeneric.cpp:28: external/libdrm/android/gralloc_handle.h:108:9: error: cannot initialize return object of type 'native_handle_t *' (aka 'native_handle *') with an lvalue of type 'struct gralloc_handle_t *' return handle; ^~~~~~ 1 error generated. This seems to be due to the gralloc_handle_create() definition claiming to return a native_handle_t * type, rather then a gralloc_handle_t *, which is what the code actually returns. This function isn't actually used in the current drm_hwcomposer, so I'm not totally sure that this fix is correct (rather then returning the gralloc_handle_t's embadedded native_handle_t ptr). But it seems something like this is needed. Cc: Robert Foss Cc: Rob Herring Signed-off-by: John Stultz --- android/gralloc_handle.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/gralloc_handle.h b/android/gralloc_handle.h index 9cb5a5d..6e925c9 100644 --- a/android/gralloc_handle.h +++ b/android/gralloc_handle.h @@ -84,7 +84,7 @@ static inline struct gralloc_handle_t *gralloc_handle(buffer_handle_t handle) /** * Create a buffer handle. */ -static inline native_handle_t *gralloc_handle_create(int32_t width, +static inline gralloc_handle_t *gralloc_handle_create(int32_t width, int32_t height, int32_t hal_format, int32_t usage) @@ -107,5 +107,4 @@ static inline native_handle_t *gralloc_handle_create(int32_t width, return handle; } - #endif