From patchwork Tue Jan 23 23:16:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 125605 Delivered-To: patches@linaro.org Received: by 10.46.66.141 with SMTP id h13csp50450ljf; Tue, 23 Jan 2018 15:16:53 -0800 (PST) X-Received: by 2002:a17:902:7e0c:: with SMTP id b12-v6mr6297113plm.308.1516749413226; Tue, 23 Jan 2018 15:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516749413; cv=none; d=google.com; s=arc-20160816; b=hHAtQCaNNhwbD+pQnUHm8bJC01j07WW3Yejb/a4RY4iVcFVr3X1mSjdqIVTV40uQNu PU9G5oZvmTk20eaPrGqdhtix96fPI8ih+t3XhjrAcLaqJ74yjixOKnVt+ZGkECBbcTSO R8m8psGXOsiTttIlMxrSZmMR07CP552GhRGYpKBA6nLGCwVhbRRmc+xluQTGTmDJ0Yhx pz/p4VUdX8l3d+nn8ZB+5dGJH97IknIcHPBQO95SF+vaoRHXjtF+IoYfyYVSjc0mpRKa jP++qtsu+JTrMqb5XrmOBRSNnrKQKM8F20Di02hApUIde9zMQYdkdZSeFNyulte0CHMx n7Zw== 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=pTWYiRkH2mM0CNy2+RkIp5kty9IjdWlQq0uGmTTU4Fs=; b=rXc6IF4xQOdKLHP3QGe6mN/3UCWx9vq9wRQ6z26XQbVz9r/j0hd+ksfpox5bJyCBQv HZWcQLGOUfd9CsU+hOe1LpPv9lAtiqRVeGUk9py30fZj8HtcjL065s3y+2IXJtjbgiXz iQKFvzDIfT5fQOt+D48w47LfuFU0Yv5tc0iqQ0JBEX5zqPcPLQeLyj0K2jl73nV2aNHg vSZU2xrSPuHPT0lQSrpxZaGrIPo3jron6jcwKKcGQsrU7ic6CD210eLVIdydZ2wGHFji MvuUT+bwoewheYRiSoE4D3QkicjpIYPwRmDHqbwK4DepnpDD219IOe1fNRsDGFPnjpyz tEOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KyZQAL0o; 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 68sor972337pfp.94.2018.01.23.15.16.53 for (Google Transport Security); Tue, 23 Jan 2018 15:16:53 -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=KyZQAL0o; 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=pTWYiRkH2mM0CNy2+RkIp5kty9IjdWlQq0uGmTTU4Fs=; b=KyZQAL0oHqQR1y91fmTddUk3lfIyW437sxG4kEoT5m4ndFN73m6NRvWXqTfv4hibbo ks/bH3OOtFRtU4pTkUot23FykKiUin+ZZ3wbotTDC0VkueAw5SeeAy2/D0JISJ60ofsE w7dbROHQhUJ0zXhAmR7MFUax76vbw7lsG882I= 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=pTWYiRkH2mM0CNy2+RkIp5kty9IjdWlQq0uGmTTU4Fs=; b=k5xwjk/fJct1NCbY+B19yUSH/swXZovx0A/tDa1EYRukfrTTHHSyvhUuwE72FkfKID uCcVWBFMq77+iAlh23CnCyIyfrxBtEv59pANQu9MtR310ZKFErhyuQyfesUiuTB7CwDQ ui0EcGoNzxsatWj43Jj/oYTPa0pIgnzxHbDJ8uixbRZ1MrQ1SRlQNFrGn4A2SuU8ZvTP w/QpKqlc8QahRM9vVU6gtWr1lmFNy7vVS4R2jjZ4esO+d5aNT6b4KE84uOWdL4PY7KlC Yq1pzH3R9L9LCE5HIH9eZNyapUzQMnNLBZLzi5dbXsJlCxm1M3GSSA6fpP7umBS1t3RI QFMw== X-Gm-Message-State: AKwxytf7R48UOFn18x7IPAAb3ONlRFcyvlr6Do2P0gqc1jS3AdjSAGAQ ZwTnIlqRyySUqKt06e4I/qUGvz2J X-Google-Smtp-Source: AH8x227Fg8stBSrlfMjwrZN0c4bSkhNtZ1FkB1GQF72GU3sImvkVkQIHH+Z1/0kVRM9OD35B0XIMMw== X-Received: by 10.98.141.199 with SMTP id p68mr10810151pfk.25.1516749412757; Tue, 23 Jan 2018 15:16:52 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id c83sm6924811pfk.8.2018.01.23.15.16.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 15:16:51 -0800 (PST) From: John Stultz To: dri-devel@lists.freedesktop.org Cc: John Stultz , Marissa Wall , Sean Paul , Dmitry Shmidt , Robert Foss , Matt Szczesiak , Liviu Dudau , David Hanna , Rob Herring Subject: [RFC][PATCH 3/4 v2] drm_hwcomposer: Use client compositing if there is only one plane Date: Tue, 23 Jan 2018 15:16:38 -0800 Message-Id: <1516749399-29504-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516749399-29504-1-git-send-email-john.stultz@linaro.org> References: <1516749399-29504-1-git-send-email-john.stultz@linaro.org> Originally based on work by Rob Herring, this patch changes ValidateDisplay() so that if there is only one plane, we modify Device composited layers to be Client composited. Without this, on devices with just one plane, nothing gets displayed on the screen. Suggestions for alternative solutions here would be greatly appreciated! Cc: Marissa Wall Cc: Sean Paul Cc: Dmitry Shmidt Cc: Robert Foss Cc: Matt Szczesiak Cc: Liviu Dudau Cc: David Hanna Cc: Rob Herring Signed-off-by: John Stultz --- v2: * Rework Rob's change to check planes --- drmhwctwo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index dfca1a6..6d88c5c 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 we only have one plane, always do Client composition */ + if (primary_planes_.size() + overlay_planes_.size() == 1) { + layer.set_validated_type(HWC2::Composition::Client); + ++*num_types; + break; + } default: layer.set_validated_type(layer.sf_type()); break;