From patchwork Fri Mar 16 21:48:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 131943 Delivered-To: patches@linaro.org Received: by 10.46.84.17 with SMTP id i17csp72579ljb; Fri, 16 Mar 2018 14:48:08 -0700 (PDT) X-Received: by 10.98.54.65 with SMTP id d62mr195370pfa.52.1521236888816; Fri, 16 Mar 2018 14:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521236888; cv=none; d=google.com; s=arc-20160816; b=VPxd4ge9BadP/UrSc/+A2G1jU/5HNAv+QnujOvprGbObJjWo0b0SZbjNwN2Xj0A/EM yvCcqoTdaKFwsu2kKP7dMsNYMiZvMn+7uOV5CHfO0CBEAI5ha4SlKNgkcL/aWw9FNb8Q AWNBkG8weXkxjzcbkqwn79jqdbCnS+g9lbVyPBVupgLTvyaX1UjcY1J1ajqHpA77ZSH1 ceD6S/iZCsQCNfI5P/LV7lnQBCsggWwtRAvrsqsE9m6hJA8iVnmB39J0O1nvNcep+ZNf 3cAbBwDeYfYLVwDw3l4fv3Lrfrz6OspauOnWPnEvNoBHt3st7VVnRaJjGak9sN5vJj6C mTdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=UU+T9enFqHQe6BHLGglaPDtJj6+ZG+7jUFxqufR0qcw=; b=Mbd0pnDO9lEZiO+8JIFvOWtFOZbKvlSHUhWa/4SYRMB8KHKc2cEeAiLpCK3rf4Ahrf iYGB2+Px4HMR8hMybmv0MKKwDDwSWW3ksS1cqFoSVGvzozwlRdZ7HWn7P5Yj5KdSnrR2 VnxkWSOn3hwTN6+4gg8RzRftHHM3vaNYGvQe9MpntQrqLLqDjTELg1KmTxGrhF9MBRRU 4dJA4Mgx6hbvuLiBqpXf2emmPa/ckontEFthG6VXQyhQ4a/i5YNzCVdN1WKIVhKElmgf mfomF/uuLrKFrqAEJX2WpqZlszmb9Ge81apuCxHa31Gwcl68HTL3Lt+q3scAOe3cmXA8 8nqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=io+rQgBU; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 34-v6sor3250789plz.36.2018.03.16.14.48.08 for (Google Transport Security); Fri, 16 Mar 2018 14:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=io+rQgBU; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=UU+T9enFqHQe6BHLGglaPDtJj6+ZG+7jUFxqufR0qcw=; b=io+rQgBUDdb7QvwB9DeejesFPAUeRWOCVnYNdVxbPenqB6uJhCi+GAlo9TpnyDmNXk vor5dNdmyvkUyardx2rgcLTTsZ4M2JL4MvVTMm/L3z1HLlpkfi7WUaLreRC+ORdtHA1l xi7wC5p+xytmlXkOoFJqdvS2Hy0Wj6thr2bLw= 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=UU+T9enFqHQe6BHLGglaPDtJj6+ZG+7jUFxqufR0qcw=; b=F522ODlPdMlmzzxCeCXqgEY7smfX4T0Pi0HIKkFB529tGWuTFUZ7A0yCm/tL1ZNts0 f07Qnv+4JmHLnOQKnIqxDOWLyOoktrQUIuCfewEmscvOO7ndZNYOfPJdTBzqSAzwRgfn i/yfuQPFBq05Yn/v2Eh2rAyeK+H5MP5cj0VzgfQA7OIpLKPyMrJmq+GO/CIPgdvLZ+e+ M70+g5iHOjdVp2NhSbgvWBQW4MSi+vQHKNbQsI/0pMzxIXssCbeoZndvpHeF4twUE8b1 uiqy7Sy076GyAYTVxt/KG4shnJKQibqNKfsBZ8iI7RY84xtYJrJZWTXsViU36iZP1R1D zrZA== X-Gm-Message-State: AElRT7FXG4MidfgsBwaBXdAEb3SZ7h3qvQEwZLRo6fQeDRECsKAkrnXH D/EQTSnX4NOmsoD4f/SqsUIgctywEy/wpg== X-Google-Smtp-Source: AG47ELsO6Kc8WHZJJfakHV/LrHoT1NajMw/b9s1SMx/A82hKb007P+dnFCSgvgjdPEeDnvqGCvtd+g== X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr3594015plr.109.1521236888048; Fri, 16 Mar 2018 14:48:08 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id q62sm3887124pfd.61.2018.03.16.14.48.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Mar 2018 14:48:06 -0700 (PDT) From: John Stultz To: dri-devel Cc: John Stultz , Robert Foss , Rob Herring , Sean Paul Subject: [RFC][PATCH] libdrm: gralloc_handle.h: Fix build issue with Android Date: Fri, 16 Mar 2018 14:48:02 -0700 Message-Id: <1521236882-21120-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 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 Cc: Sean Paul Signed-off-by: John Stultz --- android/gralloc_handle.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Robert Foss 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