From patchwork Wed Nov 5 11:25:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 5233561 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D40AE9F2F1 for ; Wed, 5 Nov 2014 11:25:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC75B201EC for ; Wed, 5 Nov 2014 11:25:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13701201D3 for ; Wed, 5 Nov 2014 11:25:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbaKELZ4 (ORCPT ); Wed, 5 Nov 2014 06:25:56 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:39747 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753520AbaKELZ4 (ORCPT ); Wed, 5 Nov 2014 06:25:56 -0500 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEK005OWD3664A0@mailout1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 05 Nov 2014 20:25:54 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 65.20.18484.2490A545; Wed, 05 Nov 2014 20:25:54 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-a2-545a0942aed5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id DD.6A.09430.2490A545; Wed, 05 Nov 2014 20:25:54 +0900 (KST) Received: from localhost.localdomain ([10.88.100.151]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NEK004B2D36XP90@mmp2.samsung.com>; Wed, 05 Nov 2014 20:25:54 +0900 (KST) From: Joonyoung Shim To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com, sw0312.kim@samsung.com Subject: [PATCH] drm/exynos: add has_vtsel flag Date: Wed, 05 Nov 2014 20:25:59 +0900 Message-id: <1415186759-21800-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJLMWRmVeSWpSXmKPExsWyRsSkUNeJMyrEYOI1ZYsrX9+zWUy6P4HF Ysb5fUwWMya/ZHNg8bjffZzJo2/LKkaPz5vkApijuGxSUnMyy1KL9O0SuDI+tvSyFlzirVjS +4SxgXERdxcjB4eEgInEs+2BXYycQKaYxIV769m6GLk4hASWMkpsvzqZCSJhItH8uIcZIjGd UeLgkkVMEE4bk8TvBbPZQKrYBPQk7mw7DtYhIqAs8XfiKkaQDcwCoRKfPkiDhIUF9CUuXN8C Vs4ioCrRMGcyO4jNK+Au0bZ4JRvEMjmJk8cms4LMlxC4zybx+cEqJogGAYlvkw+xQFwtK7Hp ADNEvaTEwRU3WCYwCi5gZFjFKJpakFxQnJReZKxXnJhbXJqXrpecn7uJERiCp/8969/BePeA 9SFGAQ5GJR5eg9zIECHWxLLiytxDjKZAGyYyS4km5wMDPa8k3tDYzMjC1MTU2Mjc0kxJnHeh 1M9gIYH0xJLU7NTUgtSi+KLSnNTiQ4xMHJxSDYxq6f85bSb4yB/d9ePVt6oElo7mtSGa6RGH zul/UpdnO1Uyac/+a9/n9/+TnSq5u25FN0/I9tqbP5nXlP7hPmv1/U3oWqXwt5O/RvtcNt3l v77y+4df/A5pjC/dj4o8W/f+EMMDh893omU0CpbI+23oUP/x6udbAy6TQ6yNO3zvXP11Vy3t opCSEktxRqKhFnNRcSIAz1nTFjwCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsVy+t9jQV0nzqgQg7fnZCyufH3PZjHp/gQW ixnn9zFZzJj8ks2BxeN+93Emj74tqxg9Pm+SC2COamC0yUhNTEktUkjNS85PycxLt1XyDo53 jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAFap6RQlphTChQKSCwuVtK3wzQhNMRN1wKmMULX NyQIrsfIAA0krGHM+NjSy1pwibdiSe8TxgbGRdxdjJwcEgImEs2Pe5ghbDGJC/fWs3UxcnEI CUxnlDi4ZBEThNPGJPF7wWw2kCo2AT2JO9uOM4HYIgLKEn8nrmLsYuTgYBYIlfj0QRokLCyg L3Hh+hawchYBVYmGOZPZQWxeAXeJtsUr2SCWyUmcPDaZdQIj9wJGhlWMoqkFyQXFSem5RnrF ibnFpXnpesn5uZsYwSH+THoH46oGi0OMAhyMSjy8BrmRIUKsiWXFlbmHGCU4mJVEeK+xRoUI 8aYkVlalFuXHF5XmpBYfYjQF2j6RWUo0OR8Yf3kl8YbGJmZGlkbmhhZGxuZK4rwHW60DhQTS E0tSs1NTC1KLYPqYODilGhiZDihn9Dbrvtzb6jQrYe3nMzdXRu/okf2zZ6Ok+/+jR/P2/DuQ 7MYpLHPmW+my0q4OzzMHz337OlHxiKfWnljZRMZpooueZMyt451kuDrD8VjvBuVWxd2erd+P vO7h2DhjWaj7r13VsSZ24S/e2qzt2d1umvyKd1OHdppCkf7c22vL6s7c0ldSYinOSDTUYi4q TgQAj4uNyIcCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The exynos fimd provides video type selection bits from system register but exynos3 series don't has it, so needs has_vtsel flag and we can distinguish whether set video type selection bits. Signed-off-by: Joonyoung Shim --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 085b066..1b32771 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -96,6 +96,7 @@ struct fimd_driver_data { unsigned int has_clksel:1; unsigned int has_limited_fmt:1; unsigned int has_vidoutcon:1; + unsigned int has_vtsel:1; }; static struct fimd_driver_data s3c64xx_fimd_driver_data = { @@ -118,6 +119,7 @@ static struct fimd_driver_data exynos4_fimd_driver_data = { .lcdblk_vt_shift = 10, .lcdblk_bypass_shift = 1, .has_shadowcon = 1, + .has_vtsel = 1, }; static struct fimd_driver_data exynos5_fimd_driver_data = { @@ -127,6 +129,7 @@ static struct fimd_driver_data exynos5_fimd_driver_data = { .lcdblk_bypass_shift = 15, .has_shadowcon = 1, .has_vidoutcon = 1, + .has_vtsel = 1, }; struct fimd_win_data { @@ -343,7 +346,8 @@ static void fimd_commit(struct exynos_drm_manager *mgr) writel(0, timing_base + I80IFCONFBx(0)); /* set video type selection to I80 interface */ - if (ctx->sysreg && regmap_update_bits(ctx->sysreg, + if (driver_data->has_vtsel && ctx->sysreg && + regmap_update_bits(ctx->sysreg, driver_data->lcdblk_offset, 0x3 << driver_data->lcdblk_vt_shift, 0x1 << driver_data->lcdblk_vt_shift)) {