From patchwork Wed Jan 16 01:39:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q0sgSHUgKOiDoeS/iuWFiSk=?= X-Patchwork-Id: 10765321 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 BB85313A4 for ; Wed, 16 Jan 2019 01:40:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9A482D2E0 for ; Wed, 16 Jan 2019 01:40:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DC2A2D2EC; Wed, 16 Jan 2019 01:40:07 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3694C2D2E0 for ; Wed, 16 Jan 2019 01:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xuqYm/B19foy86HgiTvMRRn9RlsMtFg7T1jQKFPX13I=; b=KnNKg82tg0pfSL Vl43xRspxZ5UDEtVM7QUjBLFJI4X/Hps3Gsz2yw+PMRWE0dlNZ4JyXbYeVUMHolFPnM0+rZmdj8Im qrAVWXtgq03wGqDhG4xX8CrerPV/u7S5y3+h7jE94HO/yyKM1777RpXu7E2arSirBg3YzXPE+fg18 P2RGn1hCqSky3M75IvrWX4atBfliHIy79t7ZSsm9cKSEbRo7LgTkcddThogwO3VL0QIUff1mlsk64 ahyhR9UQwDkfdEKhjbojXbJzIMyMsje2aLZlY5m116YJ/8TxGIEIz1vhpJmkSrs9RXrc47yw8QfK6 C7euXV+dG3UU6zR9JP4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjaBW-00083K-SU; Wed, 16 Jan 2019 01:40:03 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjaB8-0007dL-AT; Wed, 16 Jan 2019 01:39:40 +0000 X-UUID: afaa4560d0164821b1bb757f5540fcee-20190115 X-UUID: afaa4560d0164821b1bb757f5540fcee-20190115 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 673811074; Tue, 15 Jan 2019 17:39:32 -0800 Received: from mtkmbs03n1.mediatek.inc (172.21.101.181) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 15 Jan 2019 17:39:30 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 16 Jan 2019 09:39:29 +0800 Received: from mtkslt305.mediatek.inc (10.21.14.140) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 16 Jan 2019 09:39:29 +0800 From: CK Hu To: =?unknown-8bit?q?Philipp_Zabel_=3Cp=2Ezabel=40pengutronix=2Ede=3E=2C_Dav?= =?unknown-8bit?q?id_Airlie_=3Cairlied=40linux=2Eie=3E=2C_Daniel_Vetter_=3Cd?= =?unknown-8bit?q?aniel=40ffwll=2Ech=3E=2C_Matthias_Brugger_=3Cmatthias=2Ebg?= =?unknown-8bit?q?g=40gmail=2Ecom=3E=2C_Noralf_Tr=F8nnes__=3Cnoralf=40tronne?= =?unknown-8bit?q?s=2Eorg=3E=2C_Frank_Wunderlich_=3Cfrank-w=40public-files?= =?unknown-8bit?q?=2Ede=3E?= Subject: [PATCH 2/2] drm/mediatek: Add Mediatek framebuffer device Date: Wed, 16 Jan 2019 09:39:24 +0800 Message-ID: <20190116013924.11345-2-ck.hu@mediatek.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190116013924.11345-1-ck.hu@mediatek.com> References: <20190116013924.11345-1-ck.hu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190115_173938_368285_DDEFE3CB X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, CK Hu , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP For Mediatek drm driver, use fbdev emulation to create a framebuffer device. Signed-off-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 6ec4ca070382..5fcc0e294696 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -378,6 +379,10 @@ static int mtk_drm_bind(struct device *dev) if (ret < 0) goto err_deinit; + ret = drm_fbdev_generic_setup(drm, 32); + if (ret) + DRM_ERROR("Failed to initialize fbdev: %d\n", ret); + return 0; err_deinit: