From patchwork Tue May 28 07:55:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 2623241 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 1362B40077 for ; Tue, 28 May 2013 07:55:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBB70E60BA for ; Tue, 28 May 2013 00:55:44 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EF20E608A for ; Tue, 28 May 2013 00:55:34 -0700 (PDT) Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNI0020C0NBBDY0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 28 May 2013 16:55:31 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.112]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 80.C0.08825.3F264A15; Tue, 28 May 2013 16:55:31 +0900 (KST) X-AuditID: cbfee68e-b7f276d000002279-c6-51a462f3ae29 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 95.20.21068.3F264A15; Tue, 28 May 2013 16:55:31 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.90.8.53]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNI00HMG0OI9980@mmp1.samsung.com>; Tue, 28 May 2013 16:55:31 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/exynos: fix WINDOWS_NR checking to vidi driver Date: Tue, 28 May 2013 16:55:29 +0900 Message-id: <1369727729-5556-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.5.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsWyRsSkQPdz0pJAg33T9Cx6z51ksrjy9T2b xaT7E1gsXty7yGJxtukNu8WMyS/ZHNg8tn97wOpxv/s4k0ffllWMAcxRXDYpqTmZZalF+nYJ XBmblioUbOKq+Pn4A1MD4xqOLkYODgkBE4nmRtUuRk4gU0ziwr31bF2MXBxCAksZJTY+eMcG kTCRuH36DztEYhGjxMtbKxghnC4mia3LvjGCVLEJqEpMXHEfrENEwFSiY9JSFhCbWSBN4vv3 vewgtrCAu8TLs+dYQWwWoPqb3VuYQGxeAWeJkxv6WCG2KUj8OrKKFWSBhMB7Nokjfw8zQjQI SHybfIgF4mxZiU0HmCHqJSUOrrjBMoFRcAEjwypG0dSC5ILipPQiI73ixNzi0rx0veT83E2M wMA8/e9Z3w7GmwesDzEmA42byCwlmpwPDOy8knhDYzMjC1MTU2Mjc0sz0oSVxHnVWqwDhQTS E0tSs1NTC1KL4otKc1KLDzEycXBKNTByMB9cctrf9Ev9x/m3dp+Zx6D5adn3qw/MZlWueNBp /Ht208aXzjbmyTOOz11RVSIe/myV9p+H51azVHFVWP1dn27joPRrtbuFxCO+ZMtPEVsi5h+5 4br4QP+WBf1afIIeGYIRiw3SzuekJTB0sk9uDDljfObixDvO7YHC9kX/dh7pZP9UJJerxFKc kWioxVxUnAgA1V5P12ICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsVy+t9jAd3PSUsCDS79UbPoPXeSyeLK1/ds FpPuT2CxeHHvIovF2aY37BYzJr9kc2Dz2P7tAavH/e7jTB59W1YxBjBHNTDaZKQmpqQWKaTm JeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gBtVlIoS8wpBQoFJBYXK+nb YZoQGuKmawHTGKHrGxIE12NkgAYS1jBmbFqqULCJq+Ln4w9MDYxrOLoYOTkkBEwkbp/+ww5h i0lcuLeerYuRi0NIYBGjxMtbKxghnC4mia3LvjGCVLEJqEpMXHGfDcQWETCV6Ji0lAXEZhZI k/j+fS/YJGEBd4mXZ8+xgtgsQPU3u7cwgdi8As4SJzf0sUJsU5D4dWQV6wRG7gWMDKsYRVML kguKk9JzjfSKE3OLS/PS9ZLzczcxggP/mfQOxlUNFocYBTgYlXh4J2QvDhRiTSwrrsw9xCjB wawkwivivyRQiDclsbIqtSg/vqg0J7X4EGMy0PaJzFKiyfnAqMwriTc0NjEzsjQyN7QwMjYn TVhJnPdgq3WgkEB6YklqdmpqQWoRzBYmDk6pBkYmI0/ry5eflT02kLA/Lilec2KnfuHXBT3F cyvKd+tbiXLqG7K67eAzNrUvtvh/fY5U6oT3zAHmbSZPeZyOPWLc2M+4fjrj7CkLvK99X8Mq uOfrcm4bvyOT9dzZt92Ue6Bz8oG66TNRrvqEVX2eE8SP3j8Upz3TlMtJ+HnCxaPznRY/sVG+ a6jEUpyRaKjFXFScCACI+2WswAIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org This patch just checks if win_data array range is valid or not correctly. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 24376c1..11a016d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -282,7 +282,7 @@ static void vidi_win_mode_set(struct device *dev, if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; offset = overlay->fb_x * (overlay->bpp >> 3); @@ -332,7 +332,7 @@ static void vidi_win_commit(struct device *dev, int zpos) if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; win_data = &ctx->win_data[win]; @@ -356,7 +356,7 @@ static void vidi_win_disable(struct device *dev, int zpos) if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; win_data = &ctx->win_data[win];