From patchwork Thu Apr 26 19:05:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 134528 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2720591lji; Thu, 26 Apr 2018 12:06:02 -0700 (PDT) X-Received: by 2002:a17:902:7007:: with SMTP id y7-v6mr35052109plk.227.1524769562830; Thu, 26 Apr 2018 12:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524769562; cv=none; d=google.com; s=arc-20160816; b=vTQF4CXCawHFfBHdyLdgm7b78XV429Ww0mB+FF7ThGXszA6g0IKCF5pASnPQRmeb6w ccmF5hgBCQKa6qOdJuvwrIxiiz2mzEI2gPsWei5VOLYV2+2YBgYJOvVtsZyXbomCAloH +/s09D2ZRhtO62xMUCB6kjPLkY6P3Xj2VhgS9nl80v+mY9khqgCSXRIXS/mrRAJLkXYb SKAFQBF27rYoNPUZ+YiQVFDZS3ZmSSpt9a0xOEwsEoT/hMw94fFh32dCIK4Ep3e7LYUm CEKdUM7tIWqTzju1jgHNmD4q3JvXBpi93iV8JalZwH7sxVbSgLN4bnTPxEkkJHih4Ez0 kLzA== 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=ZLN9b2FFQk2qrZjiOeKEeYv62HpW/sL6CNkQ3kUA3YU=; b=OPFIwt9xcAnWjDk1SnXZmLNnHzaYXcYoJceNmhfIOuI5bYyQXHfgimALWRsfLdjsFb citOCjwHXdmLJHdBRPENDtFktrgYaZRi4pvvGfimcmARQQmo2Kg+ZGxYMq1vDaysQhIz vGU3qDa8c0Of1ZrlvyfNe7Zyw1JLjPU46e112CiQCrVIm2feQ5OgvKu92TZyRLlQ1B6/ 2wLY93CkRul0o++12dV98Ba71XwzDYBI43zzwPaOTJpq6ThtQ+fIqTqq2BzMZ0iOoL0g r/ITJvzR6sIrESGNdpFXS1rpi+CG54diHBIvjjehnvCJDLOz+VB9/iAJk76jSYkzR0pY NLCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B9Okh2MW; 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 b35-v6sor6360861plh.58.2018.04.26.12.06.02 for (Google Transport Security); Thu, 26 Apr 2018 12:06:02 -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=B9Okh2MW; 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=ZLN9b2FFQk2qrZjiOeKEeYv62HpW/sL6CNkQ3kUA3YU=; b=B9Okh2MWDsM/oft4TqEM7ADGPvLkx4MJdTYqbFjPTKPU9jFJfttKVpDCRtRZ2G9O8h XhtUUqZWZGZ/fw77gJpw1xwamDpJ5xUn5/gMRh7GuriViuoqYHCbUSkMBxWGHjxqk0hs UslrHqFQSD0IqeGd6EzTIgZRhLHUvZxHHdtEw= 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=ZLN9b2FFQk2qrZjiOeKEeYv62HpW/sL6CNkQ3kUA3YU=; b=ZSlXjmxW+SRcwvLmev7OgWfxYmG1/aO7H15zSE2brjwQLPpdBGDaEGBL/JF0IHFEm4 j4nuHb5rxHI7cx17RyeEQb9YpiiSeCxQHrQz2zeim3hwnjWynI02KC/WrPctMH+0lqnJ oHPw7Q23OSSwZ1I6i+slCX7c9vD56uXu0hx0X008Ue2G+NEH7MtF80gqgsmTiqVT+SW5 L26f8moLbhnQxk4pfV18YNG6PZO3RTUHZoWSrUwT0Ng18gOXxNKEnYwyaLngzWyocgGY 1btXBn3PpPsuARKpiD09vDw0BI8gp8YVrXhZsrFVntCZ4t5uIE58oj/avlaPDrXchLCj zvvA== X-Gm-Message-State: ALQs6tDWJw/o+XtmtKmujn+uuq8gVU8tYKOPWq/e21SRoXlPF7xjaArp Yz074aly07hgLf89wA2Sa0O8paeK X-Google-Smtp-Source: AIpwx48Kec1M4xnwLsZooVPZlODezL+asAXPKZ7NeIeQsN/MfkJxSgSHAW3HO7wEFKOg8ESsvz1YyQ== X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr34221232plt.374.1524769561935; Thu, 26 Apr 2018 12:06:01 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id a15sm33710956pfn.31.2018.04.26.12.06.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 12:06:00 -0700 (PDT) From: John Stultz To: dri-devel Cc: Sumit Semwal , Marissa Wall , Sean Paul , Dmitry Shmidt , Robert Foss , Matt Szczesiak , Liviu Dudau , David Hanna , Rob Herring , Alexandru-Cosmin Gheorghe , Alistair Strachan , John Stultz Subject: [PATCH hwc 1/4] drm_hwcomposer: Andorid.mk : Mark libdrmhwc_utils as vendor module Date: Thu, 26 Apr 2018 12:05:54 -0700 Message-Id: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 From: Sumit Semwal To allow drm_hwcomposer to build with Treble, set the libdrmhwc_utils library as a vendor module. Cc: Marissa Wall Cc: Sean Paul Cc: Dmitry Shmidt Cc: Robert Foss Cc: Matt Szczesiak Cc: Liviu Dudau Cc: David Hanna Cc: Rob Herring Cc: Alexandru-Cosmin Gheorghe Cc: Alistair Strachan Signed-off-by: Sumit Semwal [jstultz: commit message tweaks] Signed-off-by: John Stultz --- Android.mk | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Acked-by: Robert Foss diff --git a/Android.mk b/Android.mk index 1add286..a60d112 100644 --- a/Android.mk +++ b/Android.mk @@ -25,6 +25,7 @@ LOCAL_SRC_FILES := \ worker.cpp LOCAL_MODULE := libdrmhwc_utils +LOCAL_VENDOR_MODULE := true include $(BUILD_STATIC_LIBRARY) From patchwork Thu Apr 26 19:05:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 134529 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2720618lji; Thu, 26 Apr 2018 12:06:04 -0700 (PDT) X-Received: by 10.99.133.193 with SMTP id u184mr28893384pgd.442.1524769564264; Thu, 26 Apr 2018 12:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524769564; cv=none; d=google.com; s=arc-20160816; b=WQ1QYNWmeHh3c7yMSFjJFdnoM1mZDZ7NeShFxIj6upIcuUsOFHDfnT/GIGLXh1boV6 BUCV3qdFLomCn0xWJRAx4ghmJHanG9nnkr/dcxmJxxjL4/l2HHgY7UDOUj2m+BL5Vzt8 2yG2+EZeXrCM901CshCrl5qqSgtChS6csdnXPMLwUGoofDaDVcBup/fh8DhhQbjGREh+ 6wiEj62XS6MgKLOkcxK4B5kYGlXPKNp6/hFJbwubMeRQxEcDPaCzCTCzF7h06IQfuMm3 G+zjcwIvUGwr9unUJ2z0wdHDkXB80x8JmPweGcvUCCoAEq/RN/s9gzG5zY3d5Ye0KEbQ eFpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Zcpe5GrBsbedxjnB4wnneAB081gOMbi5Zl7Cbx2GLQU=; b=LhSLFmoF9CQOFS1VIUCikjFPozb6+b33y1UDJIZuweYGP9elNMd36caCjCPbbeVeI2 vaJOFW9H/oFoWbmP/C2mUCYOnvKb60j5d242l6VYoqccAJlS9kNOZZCOlhF0HmaQ34ID 0l6vlHG8V2WA+wicuCZlf7EjIReIhynSWAZUnaM3upx6BdfWcg8qzeLBrhCzlvvQ/TN4 QOl+86OaV4hj5vqVTBRFHevWYsuuS3EU9YpRCw50rrOuc5jkPfY7lF3dAgQaYM4ToRFy /3LNm2ncVQ6esyX34QKSkI+yH8laB8nSbajSvOLKtMbUZtX+d0h5T7acqyaoCNmGfRjf AtWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YZgPrKJy; 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 x11-v6sor6848739plm.108.2018.04.26.12.06.04 for (Google Transport Security); Thu, 26 Apr 2018 12:06:04 -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=YZgPrKJy; 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:in-reply-to:references; bh=Zcpe5GrBsbedxjnB4wnneAB081gOMbi5Zl7Cbx2GLQU=; b=YZgPrKJyCr58GFnAIVZlQq+wrP5UjMMKBwuLUeIPxGeFtENymCkUVqcCzJ0HClwV7h kA+MuOox+b9l0DR2JpINAn2YSZgrg/hHPPjEgf56Kz8PFaNlJSx5G71nyLKZF6jAzEEh /RL5Kn5pLFPvwEULvrw0QwDKlF8H+j4r5/OtA= 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:in-reply-to :references; bh=Zcpe5GrBsbedxjnB4wnneAB081gOMbi5Zl7Cbx2GLQU=; b=gbOBjOmSpk8pGuLAJBGSY0s0C0+Tg/o/z5kbbj+TEcFRIfXSmHRtKrHuy1b+0KihTm UqJ2E03J++ieJnlQd2s8cexbCEfBMRWOti8c6I2WbHYqKaz24DJ10E1Z5OZtc0kPuXEf 1Jplfv0o5SmfQr3Y8cJI2qMAIeQTFUxOuqeGd9MUHtI3v1uc3CyvxfzzFT4nYu0Mg8wY 9LFM1BH/JKEiGkSBq+zP9FOKO4c91FLkVvaxFPWFEfSM3uKdzLzUQ4hBM9c45Wqvae2W NSM2BHdKQnQ6dn+Z/DqJ5jcheu8UqDvkY0qTHS7J1p3MlbS/+qUlT5XiHBIftZL+9ywW xvHQ== X-Gm-Message-State: ALQs6tBrtV7yGy034a5lafj1Y7Bwi4npXx9qY58lewfxhv5ScrLg8KFM G8JwB2Bz0mhE5AkMUecSWMhUqFDr X-Google-Smtp-Source: AIpwx499wAa65fdA+eVqKrXLJpR1w754RtR4wVdDk4BAL5ytFnkRyj71w8XezAtBbU9XUKkGdW0CXw== X-Received: by 2002:a17:902:5304:: with SMTP id b4-v6mr23172321pli.231.1524769563746; Thu, 26 Apr 2018 12:06:03 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id a15sm33710956pfn.31.2018.04.26.12.06.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 12:06:02 -0700 (PDT) From: John Stultz To: dri-devel Cc: John Stultz , Marissa Wall , Sean Paul , Dmitry Shmidt , Robert Foss , Matt Szczesiak , Liviu Dudau , David Hanna , Rob Herring , Alexandru-Cosmin Gheorghe , Alistair Strachan Subject: [PATCH hwc 2/4] drm_hwcomposer: Use log/log.h instead of cutils/log.h Date: Thu, 26 Apr 2018 12:05:55 -0700 Message-Id: <1524769557-6108-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> References: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> When enabling Treble, Android builds are complaining about using cutils/log.h so instead use log/log.h Cc: Marissa Wall Cc: Sean Paul Cc: Dmitry Shmidt Cc: Robert Foss Cc: Matt Szczesiak Cc: Liviu Dudau Cc: David Hanna Cc: Rob Herring Cc: Alexandru-Cosmin Gheorghe Cc: Alistair Strachan Signed-off-by: John Stultz --- autolock.cpp | 2 +- drmcompositorworker.cpp | 2 +- drmconnector.cpp | 2 +- drmcrtc.cpp | 2 +- drmdisplaycomposition.cpp | 2 +- drmdisplaycompositor.cpp | 2 +- drmeventlistener.cpp | 2 +- drmhwctwo.cpp | 2 +- drmplane.cpp | 2 +- drmresources.cpp | 2 +- hwcomposer.cpp | 2 +- hwcutils.cpp | 2 +- platform.cpp | 2 +- platformdrmgeneric.cpp | 2 +- platformhisi.cpp | 2 +- virtualcompositorworker.cpp | 2 +- vsyncworker.cpp | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) -- 2.7.4 Acked-by: Robert Foss diff --git a/autolock.cpp b/autolock.cpp index 1a2ded7..795a8c2 100644 --- a/autolock.cpp +++ b/autolock.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace android { diff --git a/drmcompositorworker.cpp b/drmcompositorworker.cpp index a4e7fc9..695876d 100644 --- a/drmcompositorworker.cpp +++ b/drmcompositorworker.cpp @@ -22,7 +22,7 @@ #include -#include +#include #include namespace android { diff --git a/drmconnector.cpp b/drmconnector.cpp index 145518f..10b96b5 100644 --- a/drmconnector.cpp +++ b/drmconnector.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace android { diff --git a/drmcrtc.cpp b/drmcrtc.cpp index 1b354fe..4033269 100644 --- a/drmcrtc.cpp +++ b/drmcrtc.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include namespace android { diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp index 66e67a4..24a8e9c 100644 --- a/drmdisplaycomposition.cpp +++ b/drmdisplaycomposition.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index e556e86..e570923 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp index 5534182..9cdff81 100644 --- a/drmeventlistener.cpp +++ b/drmeventlistener.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index dfca1a6..8e00d71 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/drmplane.cpp b/drmplane.cpp index 1f739ae..4449256 100644 --- a/drmplane.cpp +++ b/drmplane.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include namespace android { diff --git a/drmresources.cpp b/drmresources.cpp index 32dd376..ec6664c 100644 --- a/drmresources.cpp +++ b/drmresources.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include namespace android { diff --git a/hwcomposer.cpp b/hwcomposer.cpp index c0aafef..338e042 100644 --- a/hwcomposer.cpp +++ b/hwcomposer.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/hwcutils.cpp b/hwcutils.cpp index 53a7d82..715c93e 100644 --- a/hwcutils.cpp +++ b/hwcutils.cpp @@ -20,7 +20,7 @@ #include "drmhwcomposer.h" #include "platform.h" -#include +#include namespace android { diff --git a/platform.cpp b/platform.cpp index 56ab37e..62b03a8 100644 --- a/platform.cpp +++ b/platform.cpp @@ -19,7 +19,7 @@ #include "drmresources.h" #include "platform.h" -#include +#include namespace android { diff --git a/platformdrmgeneric.cpp b/platformdrmgeneric.cpp index 2a6773c..8253967 100644 --- a/platformdrmgeneric.cpp +++ b/platformdrmgeneric.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/platformhisi.cpp b/platformhisi.cpp index 16c5e6f..3f5c319 100644 --- a/platformhisi.cpp +++ b/platformhisi.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include "gralloc_priv.h" diff --git a/virtualcompositorworker.cpp b/virtualcompositorworker.cpp index 639dc86..b64b414 100644 --- a/virtualcompositorworker.cpp +++ b/virtualcompositorworker.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/vsyncworker.cpp b/vsyncworker.cpp index 3bfe4be..d431d2e 100644 --- a/vsyncworker.cpp +++ b/vsyncworker.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include namespace android { From patchwork Thu Apr 26 19:05:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 134530 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2720658lji; Thu, 26 Apr 2018 12:06:06 -0700 (PDT) X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr35379145plo.72.1524769566061; Thu, 26 Apr 2018 12:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524769566; cv=none; d=google.com; s=arc-20160816; b=JIWHnIPzV7nqUMffTFWBKeWYf4RDKj2EuazCfe3vmPaW1KYUJnunabrqbzEq+HFm5F +ksUBz5g3Rz8Rug326jQF7NRHNvg/lugR4lfDZLvqLZDSr3txcoLjbtdgWGms5k6JOYg X0SiPXmAN9KdIdqAkA7g77MoqTBeRFI+ShV3FqP4lwvLBWrFM4By9f1F3uknA8rKZ+x2 9BkogPUdwfThi6Eu59wMzy5Cfuz/eQcqsUykIw5XVMFBu2d/+XaDMduZwHXPFyX94TGq Xl9oEY9A9dHc9H9Mfl7FVN8bA5t5DDgk8iV2hsfU52F5bTwbUZEd4zHLjxwLWd2N9jez /MoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=UyHERUhYQcftCPrA+HNwDGZ0lcKeFKtSjhwMtHpmSF4=; b=kpz9rEndbjCjvTH7+RPsdX1Caz66YvFOS/b/njf6IJ/PiTruiCeLvtzFEzq1NyH2eL 6N1X+7fPoHqyBMup13uOklSxZNIs3BfW7Q5SEl9FR0tE89iMRs8qwMcrynG1bQ6p5ByK mEpVG3tQ/VUuUnVBcIsXuuX4ZgjoP9w5wj/MabFMUH8BhsDeTevAKA/bkmNX1exGiDqw uoX1pbqUpNle6/ZJHexulNI7fvoB7tGuqKi6i/hfDOjVYmvs7Xd1haeetiY0rNHA4A7B 2/+Nx3kOGPFlFPt+85rkCEqfoaMnTgDZ5mUg8lLxZrRwIN5a2ggIg1+l6HfP7OLcZ29I wMqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LP7HFYDa; 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 y21-v6sor2362456pll.103.2018.04.26.12.06.05 for (Google Transport Security); Thu, 26 Apr 2018 12:06:06 -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=LP7HFYDa; 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:in-reply-to:references; bh=UyHERUhYQcftCPrA+HNwDGZ0lcKeFKtSjhwMtHpmSF4=; b=LP7HFYDalCsOOo/hp0DsVPqyIYGrXQLzIG5SQfjWyDPjUpejurUAucbz407D8lsklB SmFPW+vQMW6pK8tFj/c47/rfCM32SuY7PceQnbLV+pE00uDs4VdLYNA7Obn2oXyZXIwC SKakdPHGH3IvN403lV1tJc9150lr1fHoPMk3g= 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:in-reply-to :references; bh=UyHERUhYQcftCPrA+HNwDGZ0lcKeFKtSjhwMtHpmSF4=; b=bEb+tkJzuTiojOetZc3y/JvDco9JeVnsG4hU5SDKyOOvPZWxbVf5GoQFir988bL8ZP c+o+8fPKvsHgRDn/RFbvLrKbvD8cxsZKaKt/H8b3L3VaB85pEl0PnkQpaRktXX4JocYt bLFdBqNLCGOfhuf8NSLTDmRXnBHpzZ44yuAOvKQxzaGSwY3gHedE1GmCW7YqkvYPo7P4 omrxW7fUOiypWu9NjfIrFwmBAmQ82Av7w+bi+w30Bi/1A4y9bPx7SnAtg1fjqgoVEfUW ups/N2YusSKBRsvPzRLDsGivl4KGfUlUEJ32+o15EoT7aCX9CPNlKeHWCwURYSOl5n/Z SnKw== X-Gm-Message-State: ALQs6tAo4FbihBoGvmraU+oh3zKAgP99CrXtYg+dITkWp5DajBIYHCpt iJBzflq8yk5kmk2AJ+AHkvaW7+Y+ X-Google-Smtp-Source: AIpwx49Qu2VufSqerz0aIkIo+F0IWDIztqzCjf0dd5CXGr9QTork+Lhj0WyaDj0P/1Uo5Mo6ldOQDw== X-Received: by 2002:a17:902:b691:: with SMTP id c17-v6mr35629041pls.192.1524769565587; Thu, 26 Apr 2018 12:06:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id a15sm33710956pfn.31.2018.04.26.12.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 12:06:04 -0700 (PDT) From: John Stultz To: dri-devel Cc: John Stultz , Marissa Wall , Sean Paul , Dmitry Shmidt , Robert Foss , Matt Szczesiak , Liviu Dudau , David Hanna , Rob Herring , Alexandru-Cosmin Gheorghe , Alistair Strachan Subject: [PATCH hwc 3/4] drm_hwcomposer: Cleanup gl precompositor init and provide uses_GL flag Date: Thu, 26 Apr 2018 12:05:56 -0700 Message-Id: <1524769557-6108-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> References: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> The drm_hwcomposer has its own GL pre-compositor which is used to squish layers when there are more layers then planes on the display hardware. In many ways this duplicates the client-side GL compositing that is done in SurfaceFlinger, but in theory can be more highly optimized for the hardware. Unfortunately, due to these optimizations, the drm_hwcomposer's pre-compositor becomes somewhat hardware specific (originally targeting nvidia hardware, I believe). So on some hardware, the gl precompositor may not actually initialize due to hardware missing features, or the hardware supporting different shader APIs. Rather then try to rework the drm_hwcomposers precompositor to be more generic, I instead suggest that when the precompositor fails to initialize, we simply fall back to the already more widely compatible client compositor in SurfaceFlinger. Thus, this patch cleans up some of the precompositor initialization, which didn't handle failures well. Cc: Marissa Wall Cc: Sean Paul Cc: Dmitry Shmidt Cc: Robert Foss Cc: Matt Szczesiak Cc: Liviu Dudau Cc: David Hanna Cc: Rob Herring Cc: Alexandru-Cosmin Gheorghe Cc: Alistair Strachan Reviewed-by: Rob Herring Signed-off-by: John Stultz --- drmdisplaycompositor.cpp | 40 +++++++++++++++++++++------------------- drmdisplaycompositor.h | 3 +++ 2 files changed, 24 insertions(+), 19 deletions(-) -- 2.7.4 Acked-by: Robert Foss diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index e570923..40af3be 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -222,6 +222,13 @@ int DrmDisplayCompositor::Init(DrmResources *drm, int display) { return ret; } + pre_compositor_.reset(new GLWorkerCompositor()); + ret = pre_compositor_->Init(); + if (ret) { + ALOGE("Failed to initialize OpenGL compositor %d", ret); + pre_compositor_.reset(); + } + initialized_ = true; return 0; } @@ -294,14 +301,16 @@ int DrmDisplayCompositor::ApplySquash(DrmDisplayComposition *display_comp) { } std::vector ®ions = display_comp->squash_regions(); - ret = pre_compositor_->Composite(display_comp->layers().data(), + if (pre_compositor_) { + ret = pre_compositor_->Composite(display_comp->layers().data(), regions.data(), regions.size(), fb.buffer(), display_comp->importer()); - pre_compositor_->Finish(); + pre_compositor_->Finish(); - if (ret) { - ALOGE("Failed to squash layers"); - return ret; + if (ret) { + ALOGE("Failed to squash layers"); + return ret; + } } ret = display_comp->CreateNextTimelineFence(); @@ -328,14 +337,16 @@ int DrmDisplayCompositor::ApplyPreComposite( } std::vector ®ions = display_comp->pre_comp_regions(); - ret = pre_compositor_->Composite(display_comp->layers().data(), + if (pre_compositor_) { + ret = pre_compositor_->Composite(display_comp->layers().data(), regions.data(), regions.size(), fb.buffer(), display_comp->importer()); - pre_compositor_->Finish(); + pre_compositor_->Finish(); - if (ret) { - ALOGE("Failed to pre-composite layers"); - return ret; + if (ret) { + ALOGE("Failed to pre-composite layers"); + return ret; + } } ret = display_comp->CreateNextTimelineFence(); @@ -395,15 +406,6 @@ int DrmDisplayCompositor::PrepareFrame(DrmDisplayComposition *display_comp) { std::vector &pre_comp_regions = display_comp->pre_comp_regions(); - if (!pre_compositor_) { - pre_compositor_.reset(new GLWorkerCompositor()); - int ret = pre_compositor_->Init(); - if (ret) { - ALOGE("Failed to initialize OpenGL compositor %d", ret); - return ret; - } - } - int squash_layer_index = -1; if (squash_regions.size() > 0) { squash_framebuffer_index_ = (squash_framebuffer_index_ + 1) % 2; diff --git a/drmdisplaycompositor.h b/drmdisplaycompositor.h index f1965fb..ed6c5f9 100644 --- a/drmdisplaycompositor.h +++ b/drmdisplaycompositor.h @@ -98,6 +98,9 @@ class DrmDisplayCompositor { return &squash_state_; } + bool uses_GL() { + return !!pre_compositor_; + } private: struct ModeState { bool needs_modeset = false; From patchwork Thu Apr 26 19:05:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 134531 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2720690lji; Thu, 26 Apr 2018 12:06:07 -0700 (PDT) X-Received: by 10.99.3.81 with SMTP id 78mr5387547pgd.355.1524769567782; Thu, 26 Apr 2018 12:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524769567; cv=none; d=google.com; s=arc-20160816; b=DVxK3lHbdqNqAQ2MsXcSHyeOdFeCHcrjhYZLB9jf3PSlOWx8RmEklO6N+CoeJSAH1F MArtHYWuCYBUBEByP6KbiPlqHYGkzG766LIAEm4L+NI7kiLQ4Vh92Bi23A6xLG0YbNMQ c5JtBzBSM26UuNhfeUtCLwKDmzyfwTip5XRvy6U8eHnmTKi8qg1sWrU/mwHe/M9nXimw NXO3keIzwykvlgtwB7W9I3ZkDMDyLkR9kPPLDcTDeyYOL5Qm/kmzVFLHC1klkJW9fAj0 2uR1Lb5ADzcHh/P4NdYrf5P/JUBOpUtr2YCtGsn2Z8xfoknMCBuzRMIVX/MWm4rFrBpG HNSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Vit1oxp8QlAgTv6JqI8NdkLpv+sLQA79ul3EUr67k7g=; b=yntlyFxGO9zzyWUlvkoRDtZQcPWwbjiQfLZ90t9mEL3Z8OT5tfobftEUKkzaQnqw1I lGm9FcrNtzhkeIYozUHX4awaiCpH8nY1a0kheg8dFBoFNa/oWRAV2F2CBhLiqJ63nRg7 qgJZlaSYFgd7MzLjTbwPQaDDBQGhNn/5I7sjayZVIYE0wyIlW2uzPHAHblB79jThiMs5 ahNCCx8kwj6QE06F1aNo5DP4+t/RKQosQWMFsbjD0Qn987iTJSZdSgDzg1HA+rW+qpiB e2bJHlMAo0Lh6IcS81Qmu+w6IGCrf40vSlzpP0BJ7HQ2bUPSiN2eUTmRQmGzbQK9hTBB BOCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fx8alPbT; 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 a63-v6sor7134518pla.2.2018.04.26.12.06.07 for (Google Transport Security); Thu, 26 Apr 2018 12:06:07 -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=fx8alPbT; 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:in-reply-to:references; bh=Vit1oxp8QlAgTv6JqI8NdkLpv+sLQA79ul3EUr67k7g=; b=fx8alPbTxdqhONDih8Z8orNAtrlEoKrCGtGVJoEH3sZeqORpxXngrENe+55hJj3qgb t4dUCyl7hjOPLQCXN1ud6TR+s5GqG07HqkJfH7COmoqYJLVVQkzJP00hNXWom09Mo+1v BnkjBM9544ZKEH8NVUUiaXSzA449G05ADMocs= 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:in-reply-to :references; bh=Vit1oxp8QlAgTv6JqI8NdkLpv+sLQA79ul3EUr67k7g=; b=AUrzT/CcOHLwuWs02uXEoDP++WVXrnSV7/R6w5nt4xM7K5jPmX3pJksyepJAj5Dna/ rnBJZU4qiUVw0dI1bjyIi6ARe6Sy5J+xMqXeAqomVnxfRTzA30/WCjZCVFcgD0sWQOl7 8zhHIfvfdgzYiLhzaeUaIpduASHDpSujdbxuQJVNRMyPxwx09M8tXXLliGFI2CRK5VcN rKyK4cOUcabifZEO2kE3A03f8gqKGAR07tb0NWsHfAKTex7ZnUZmseOBeo8ARibfsUsP RVwjt2wDRohOArTba97ml/zDTE2X2QihteNvzbXdKV6y8Z58QaznlGAr5P99ks+alOFZ hI7w== X-Gm-Message-State: ALQs6tDEH1/bHJ4u9gW8G8jRwXl4FYRW0pakC7SW/FZ50DdpPg7ZPrmH 9c8W4SOOj/dCwbsaonbn9JsyQBEd X-Google-Smtp-Source: AB8JxZqHvpnClZbi5RLdt1HtNhNgIXjhwkXJG2A/B1yX3jXxJ9Ty8Q5hNEy0fRYiD7GnaIwbCThUmQ== X-Received: by 2002:a17:902:b286:: with SMTP id u6-v6mr12239991plr.68.1524769567295; Thu, 26 Apr 2018 12:06:07 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id a15sm33710956pfn.31.2018.04.26.12.06.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 12:06:06 -0700 (PDT) From: John Stultz To: dri-devel Cc: John Stultz , Marissa Wall , Sean Paul , Dmitry Shmidt , Robert Foss , Matt Szczesiak , Liviu Dudau , David Hanna , Rob Herring , Alexandru-Cosmin Gheorghe , Alistair Strachan Subject: [PATCH hwc 4/4] drm_hwcomposer: Fall back to client compositon if the gl precompostior fails Date: Thu, 26 Apr 2018 12:05:57 -0700 Message-Id: <1524769557-6108-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> References: <1524769557-6108-1-git-send-email-john.stultz@linaro.org> If the gl precompositor isn't being used, we cannot accept every layer as a device composited layer. Thus this patch adds some extra logic in the validate function to fall back to client side compositing if the gl precompositor did not initialize properly. This does force everything to a single plane even if we have a few available, but a deeper rework of the validate step planning is needed before we can reliably make use of them. Credit to Rob Herring, who's single plane patch was what this was originally based on. Cc: Marissa Wall Cc: Sean Paul Cc: Dmitry Shmidt Cc: Robert Foss Cc: Matt Szczesiak Cc: Liviu Dudau Cc: David Hanna Cc: Rob Herring Cc: Alexandru-Cosmin Gheorghe Cc: Alistair Strachan Reviewed-by: Rob Herring Signed-off-by: John Stultz --- v2: * Dropped misguided attempt to trivially allocate layers to planes --- drmhwctwo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 Acked-by: Robert Foss diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index 8e00d71..ede75e0 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -695,6 +695,13 @@ HWC2::Error DrmHwcTwo::HwcDisplay::ValidateDisplay(uint32_t *num_types, layer.set_validated_type(HWC2::Composition::Client); ++*num_types; break; + case HWC2::Composition::Device: + if (!compositor_.uses_GL()) { + layer.set_validated_type(HWC2::Composition::Client); + ++*num_types; + break; + } + /* fall through */ default: layer.set_validated_type(layer.sf_type()); break;