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: 130833 Delivered-To: patches@linaro.org Received: by 10.46.66.2 with SMTP id p2csp4373135lja; Tue, 6 Mar 2018 12:29:05 -0800 (PST) X-Received: by 10.101.98.137 with SMTP id f9mr15727832pgv.6.1520368145460; Tue, 06 Mar 2018 12:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520368145; cv=none; d=google.com; s=arc-20160816; b=ude5gFhIpZ8h8RefIOFlrAZ3s60WG87BofeD1vuxHbjM26Sg1IcgeefHeTvZ2IurTe jU+MNGQ+dZ4aDEzzpSlsc1TAwwsuxHprDlKFi1EDp60Kxn4vKSI6ixlYCsaMkchr+qj6 +MHai5WJR100vG41RrRYL6rO+92Lzdsfj13t5KAmo8QrTZy3inShfZIFuvtnjcj4yaiD e+EfywLEyiaPlCToF2UXBenEQ9QpaM2ekD06xjfqnTR3KQ4Y34IvAX8AiA8KOAxCczaF XM4Imf8CR16BeZDOuS5ODsSrIT064FHr9b0IErC0ulI0Oi0F9qHJvsI1JtoiE0RZY0Bj EQHQ== 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=smeLasOiN5CgI00xkS6fr2vdVTTRrib/DgSyGXHR8I4=; b=AmAi097nTKK2oa/ar7ZmToRlbOnFrNr6zi+dGwlOOlS8Mck1AmEA1UIrVArw1zqOZx OsXKREwK48wqagfJt7F0Bqet3U1KCdQ8k9t41wDDwdNoEqUamTaleZczhSmml+fWtpCA yqPFo3Rp+eQHNrfR4ZAhW3SnhaIRM33EKHqj/02Wae+G3CzFRgxLF9VN/MFrkdDfNJ12 brT0UIckKS98gJcPch8sAEm1pZOzwYsC8wrmll8vmkeTBaxo4HSMvSA3Jr44F+39hGQY MvzODgsHiBewnFAlC57TBfqKOootpIpjfGsrQbRexryDDmGyjFGnISlVCP6XANUimxHe cD8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a8TnzIxa; 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 u1-v6sor4967254plb.16.2018.03.06.12.29.05 for (Google Transport Security); Tue, 06 Mar 2018 12:29:05 -0800 (PST) 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=a8TnzIxa; 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=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=MlACNV7JH7hQVv0gUaxd59EQbnmp9VXQqSem0GTMSftqBtnDYHo7Lc2NWJy8HEZo32 Gm5cS6jy0ODsof7gQrs8FVuwHFrqY3Rh5YL66RBnJQNNrdUjVPJAUB4vrqJBCq1YfRYx kOaFmHrlVWW2BmawewkOjC3Q9foxwlrBv1z1yiA6YjyY5Eyw4BNrQH4/Xc936y4ibOG2 QGBQjXNbYXvuArejfHJrZWeEy0g8I5tCaYMjJsSAQYk75ZpBqh6KFO9f7kZvgqnoaFAP z/QTHu7bKe7UtHIYcdeQ1EfmObhhI0ZF5ARj+ZEzkL17g4C6grNfEGutjg+WZI388D3P qehg== X-Gm-Message-State: APf1xPAsDE7aN1xgdVhASdPeKbeZAKbbEBF2/pMEeJu350MgoN2CoHdm 8dEQBKvpeVsULvnivID2eBZM+FgG 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) Return-Path: 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 Cc: John Stultz , Robert Foss , Rob Herring 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 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(-) -- 2.7.4 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