From patchwork Sun Nov 1 18:48:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Naik X-Patchwork-Id: 56889 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA1IpZZj022108 for ; Sun, 1 Nov 2009 18:51:36 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nA1Io8Sn009871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Nov 2009 12:50:08 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id nA1Io6A3014490; Sun, 1 Nov 2009 12:50:07 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6DA9C80627; Sun, 1 Nov 2009 12:50:06 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 2013380626 for ; Sun, 1 Nov 2009 12:50:05 -0600 (CST) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id nA1Io4oe010957 for ; Sun, 1 Nov 2009 12:50:04 -0600 (CST) Received: from mail106-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.113]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id nA1Io4GS024285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 1 Nov 2009 12:50:04 -0600 Received: from mail106-va3 (localhost.localdomain [127.0.0.1]) by mail106-va3-R.bigfish.com (Postfix) with ESMTP id 09DA1E482D0 for ; Sun, 1 Nov 2009 18:50:04 +0000 (UTC) X-SpamScore: -12 X-BigFish: vps-12(zzzza48T1202hzzz2dh6bh34h61h) X-Spam-TCS-SCL: 0:0 X-MS-Exchange-Organization-Antispam-Report: OrigIP: 216.239.58.186; Service: EHS Received: by mail106-va3 (MessageSwitch) id 1257101373667723_9359; Sun, 1 Nov 2009 18:49:33 +0000 (UCT) Received: from VA3EHSMHS013.bigfish.com (unknown [10.7.14.252]) by mail106-va3.bigfish.com (Postfix) with ESMTP id 84C5E1BC0097 for ; Sun, 1 Nov 2009 18:48:50 +0000 (UTC) Received: from gv-out-0910.google.com (216.239.58.186) by VA3EHSMHS013.bigfish.com (10.7.99.23) with Microsoft SMTP Server id 14.0.482.32; Sun, 1 Nov 2009 18:48:50 +0000 Received: by gv-out-0910.google.com with SMTP id n29so556480gve.1 for ; Sun, 01 Nov 2009 10:48:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.158.7 with SMTP id s7mr472532hbc.53.1257101328877; Sun, 01 Nov 2009 10:48:48 -0800 (PST) From: Sameer Naik Date: Mon, 2 Nov 2009 00:18:28 +0530 Message-ID: <1c12dfe70911011048r75273148gc53e2553a62d3f9d@mail.gmail.com> To: davinci-linux-open-source@linux.davincidsp.com X-Reverse-DNS: gv-out-0910.google.com Subject: [PATCH] davincifb driver fix X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com diff --git a/drivers/video/davincifb.c b/drivers/video/davincifb.c index 1344be7..199c335 100644 --- a/drivers/video/davincifb.c +++ b/drivers/video/davincifb.c @@ -295,20 +295,26 @@ static irqreturn_t davincifb_isr(int irq, void *arg) unsigned long addr=0; if ((dispc_reg_in(VENC_VSTAT) & 0x00000010) == 0x10) { - xchg(&addr, dm->osd0->sdram_address); - if (addr) { - set_sdram_params(dm->osd0->info.fix.id, - dm->osd0->sdram_address, - dm->osd0->info.fix.line_length); - dm->osd0->sdram_address = 0; + if (dm->osd0) + { + xchg(&addr, dm->osd0->sdram_address); + if (addr) { + set_sdram_params(dm->osd0->info.fix.id, + dm->osd0->sdram_address, + dm->osd0->info.fix.line_length); + dm->osd0->sdram_address = 0; + } } - addr = 0; - xchg(&addr, dm->osd1->sdram_address); - if (addr) { - set_sdram_params(dm->osd1->info.fix.id, - dm->osd1->sdram_address, - dm->osd1->info.fix.line_length); - dm->osd1->sdram_address = 0; + if (dm->osd1) + { + addr = 0; + xchg(&addr, dm->osd1->sdram_address); + if (addr) { + set_sdram_params(dm->osd1->info.fix.id, + dm->osd1->sdram_address, + dm->osd1->info.fix.line_length); + dm->osd1->sdram_address = 0; + } } addr = 0; xchg(&addr, dm->vid0->sdram_address); @@ -318,13 +324,16 @@ static irqreturn_t davincifb_isr(int irq, void *arg) dm->vid0->info.fix.line_length); dm->vid0->sdram_address = 0; } - addr = 0; - xchg(&addr, dm->vid1->sdram_address); - if (addr) { - set_sdram_params(dm->vid1->info.fix.id, - dm->vid1->sdram_address, - dm->vid1->info.fix.line_length); - dm->vid1->sdram_address = 0; + if (dm->vid1) + { + addr = 0; + xchg(&addr, dm->vid1->sdram_address); + if (addr) { + set_sdram_params(dm->vid1->info.fix.id, + dm->vid1->sdram_address, + dm->vid1->info.fix.line_length); + dm->vid1->sdram_address = 0; + } } return IRQ_HANDLED; } else {