From patchwork Mon Oct 9 16:06:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 9993841 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 ACEE660230 for ; Mon, 9 Oct 2017 16:06:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FAC528773 for ; Mon, 9 Oct 2017 16:06:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92F1D287D4; Mon, 9 Oct 2017 16:06:12 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 A041828773 for ; Mon, 9 Oct 2017 16:06:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63EFC6E12D; Mon, 9 Oct 2017 16:06:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 356EC6E12D for ; Mon, 9 Oct 2017 16:06:09 +0000 (UTC) Received: by mail-oi0-f65.google.com with SMTP id j126so16995071oib.8 for ; Mon, 09 Oct 2017 09:06:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=mBeBEjHolpVWjkd0aTblSwPktE8QEupCgDQKhJzqTqU=; b=BDBnWo1fWuhybdxC/lCZdZY5DSZtPs99OPxSc1OrKdTdXkzhzfEiczgKK4L23W1ai1 pvoOcRSTnpds/wD6n4r4olyMoBh4nFTNEKShHLRGer3MYfzKAHG44jCNhjNgKzad/1x4 4m+c+Jc+0BknEk2r9/X5R8fxdF6Y0zrke1qSfTPwKr+zsZT64H38Z2ARv2HY73nQJ/UT PHByujWruvcskwSKlGn26s2Fr3y3bUfpJIW3e3vOub47HqRwDOvt6mMwhRW4pee5w54D mxabbQpkFotxTkTKzGKlMKKrWCGM5NdUu6GHtUM/u2fFNAodjgUlq3VuflsdnfJZ/hCi uitA== X-Gm-Message-State: AMCzsaV3KAe97pLI2H/2lXUl5IFuk5/bF6IwdMyNfiz5gcrG+bvN4Mct VnuQszG8D9fb0Mg0HGAaoDnmWZk= X-Google-Smtp-Source: AOwi7QCoNXeLvry/JHNFOwSO7G2mypsBNgZd5/mu/+Blp6f5BBZVRN0YDbhFsArmN8dyVISFwudPGA== X-Received: by 10.202.192.8 with SMTP id q8mr5053843oif.243.1507565168166; Mon, 09 Oct 2017 09:06:08 -0700 (PDT) Received: from localhost.localdomain (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id e124sm83375oia.30.2017.10.09.09.06.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Oct 2017 09:06:07 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH hwc] drm_hwcomposer: fix return values for ValidateDisplay Date: Mon, 9 Oct 2017 11:06:04 -0500 Message-Id: <20171009160604.24008-1-robh@kernel.org> X-Mailer: git-send-email 2.11.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP According to the API documentation, if we've set num_types, then the return value should be HWC2::Error::HasChanges. Signed-off-by: Rob Herring --- drmhwctwo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index 89399bf1ba33..0f258770a8bb 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -701,7 +701,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::ValidateDisplay(uint32_t *num_types, break; } } - return HWC2::Error::None; + return *num_types ? HWC2::Error::HasChanges : HWC2::Error::None; } HWC2::Error DrmHwcTwo::HwcLayer::SetCursorPosition(int32_t x, int32_t y) {