From patchwork Thu Oct 18 19:58:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10647987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C8921057 for ; Thu, 18 Oct 2018 19:58:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EDB928E6B for ; Thu, 18 Oct 2018 19:58:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 633BF28E7A; Thu, 18 Oct 2018 19:58:55 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C58E28E6B for ; Thu, 18 Oct 2018 19:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbeJSEB3 (ORCPT ); Fri, 19 Oct 2018 00:01:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33580 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbeJSEB2 (ORCPT ); Fri, 19 Oct 2018 00:01:28 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A186F61310; Thu, 18 Oct 2018 19:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539892733; bh=COyUVK836Tc4/veQBxekpz/pQwnmWBKMEWNfGLTjMxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bnzKbj+p5KKlHe/Tue/cy0O6iHOA6zPLl5f4VIstWGtnSWwkfjCe96cvxyta+ael8 TtBPLmObJ6SdzXpPRHOgPQa4j/wYdC3ygrxDazKnT3cxnnN56+hlxq1yf0WU7Q0oOE BG0IeyaLoLy6I2ZVbbuw6dAB9i28cwL+qrB7JfCo= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 12A2360BFA; Thu, 18 Oct 2018 19:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539892732; bh=COyUVK836Tc4/veQBxekpz/pQwnmWBKMEWNfGLTjMxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UB8UQ56QwRyIPX3AVSLT54iHZd1gZJtYhV9rD7/IQZ4bw6Sxwb4MwyVwKqn7/f/4c J+Hoz/R2vnECrTSnZgVpA6oNKgE9xCrGQLWs3pZAA2x38uQ9c0rqJ+Vtjb7SBHR2h7 3yNBJZeFhiAz1nbk6QasqvyIBU3fbx+KAR949uus= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 12A2360BFA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, seanpaul@chromium.org, abhinavk@codeaurora.org Subject: [PATCH 07/11] drm/msm: Make irq_postinstall optional Date: Thu, 18 Oct 2018 13:58:32 -0600 Message-Id: <20181018195836.15885-8-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181018195836.15885-1-jcrouse@codeaurora.org> References: <20181018195836.15885-1-jcrouse@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow the KMS operation 'irq_postinstall' to be optional so that the target display drivers don't need to define a dummy function if they don't need one. Signed-off-by: Jordan Crouse Reviewed-by: Bruce Wang --- drivers/gpu/drm/msm/msm_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 107e976be55e..8ce6992dbdff 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -724,7 +724,11 @@ static int msm_irq_postinstall(struct drm_device *dev) struct msm_drm_private *priv = dev->dev_private; struct msm_kms *kms = priv->kms; BUG_ON(!kms); - return kms->funcs->irq_postinstall(kms); + + if (kms->funcs->irq_postinstall) + return kms->funcs->irq_postinstall(kms); + + return 0; } static void msm_irq_uninstall(struct drm_device *dev)