From patchwork Tue Jul 7 11:51:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaithrika U S X-Patchwork-Id: 1305 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 07 Jul 2009 12:39:08 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 07 Jul 2009 09:40:06 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MO9wy-0003f5-IH; Tue, 07 Jul 2009 12:39:08 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbZGGMjC (ORCPT + 1 other); Tue, 7 Jul 2009 08:39:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755995AbZGGMjC (ORCPT ); Tue, 7 Jul 2009 08:39:02 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:52821 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755387AbZGGMjA (ORCPT ); Tue, 7 Jul 2009 08:39:00 -0400 Received: from dflp53.itg.ti.com ([128.247.5.6]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n67CcpwM014294; Tue, 7 Jul 2009 07:38:56 -0500 Received: from tidmzi-ftp.india.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with SMTP id n67Ccm2p004265; Tue, 7 Jul 2009 07:38:49 -0500 (CDT) Received: from symphonyindia.ti.com (symphony-ftp [192.168.247.11]) by tidmzi-ftp.india.ext.ti.com (Postfix) with SMTP id 744EB3887D; Tue, 7 Jul 2009 18:06:03 +0530 (IST) Received: from localhost.localdomain ([192.168.247.76]) by symphonyindia.ti.com (8.12.10/8.12.10) with ESMTP id n67CYahu007065; Tue, 7 Jul 2009 18:04:36 +0530 From: Chaithrika U S To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, hverkuil@xs4all.nl, davinci-linux-open-source@linux.davincidsp.com, Chaithrika U S Subject: [PATCH]: v4l: DaVinci: DM646x: Updates to VPIF display driver Date: Tue, 7 Jul 2009 07:51:42 -0400 Message-Id: <1246967503-8525-1-git-send-email-chaithrika@ti.com> X-Mailer: git-send-email 1.5.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Minor fixes like change in the names of the standards, remove inclusion of version.h in the header file. Signed-off-by: Chaithrika U S --- Applies to v4l-dvb repo drivers/media/video/davinci/vpif_display.c | 16 +++++----------- drivers/media/video/davinci/vpif_display.h | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index 969d4b3..0fba8d8 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c @@ -85,11 +85,11 @@ static struct device *vpif_dev; static const struct vpif_channel_config_params ch_params[] = { { - "NTSC", 720, 480, 30, 0, 1, 268, 1440, 1, 23, 263, 266, + "NTSC_M", 720, 480, 30, 0, 1, 268, 1440, 1, 23, 263, 266, 286, 525, 525, 0, 1, 0, V4L2_STD_525_60, }, { - "PAL", 720, 576, 25, 0, 1, 280, 1440, 1, 23, 311, 313, + "PAL_BDGHIK", 720, 576, 25, 0, 1, 280, 1440, 1, 23, 311, 313, 336, 624, 625, 0, 1, 0, V4L2_STD_625_50, }, }; @@ -390,6 +390,7 @@ static int vpif_get_std_info(struct channel_obj *ch) config = &ch_params[index]; if (config->stdid & std_info->stdid) { memcpy(std_info, config, sizeof(*config)); + std_info->stdid = vid_ch->stdid & config->stdid; break; } } @@ -997,6 +998,7 @@ static int vpif_s_std(struct file *file, void *priv, v4l2_std_id *std_id) return -EINVAL; } + *std_id = ch->vpifparams.std_info.stdid; if ((ch->vpifparams.std_info.width * ch->vpifparams.std_info.height * 2) > config_params.channel_bufsize[ch->channel_id]) { @@ -1395,7 +1397,7 @@ static int initialize_vpif(void) /* Allocate memory for six channel objects */ for (i = 0; i < VPIF_DISPLAY_MAX_DEVICES; i++) { vpif_obj.dev[i] = - kmalloc(sizeof(struct channel_obj), GFP_KERNEL); + kzalloc(sizeof(struct channel_obj), GFP_KERNEL); /* If memory allocation fails, return error */ if (!vpif_obj.dev[i]) { free_channel_objects_index = i; @@ -1511,20 +1513,12 @@ static __init int vpif_probe(struct platform_device *pdev) /* Initialize field of the channel objects */ atomic_set(&ch->usrs, 0); for (k = 0; k < VPIF_NUMOBJECTS; k++) { - ch->common[k].numbuffers = 0; common = &ch->common[k]; - common->io_usrs = 0; - common->started = 0; spin_lock_init(&common->irqlock); mutex_init(&common->lock); - common->numbuffers = 0; common->set_addr = NULL; - common->ytop_off = common->ybtm_off = 0; - common->ctop_off = common->cbtm_off = 0; common->cur_frm = common->next_frm = NULL; - memset(&common->fmt, 0, sizeof(common->fmt)); common->numbuffers = config_params.numbuffers[k]; - } ch->initialized = 0; ch->channel_id = j; diff --git a/drivers/media/video/davinci/vpif_display.h b/drivers/media/video/davinci/vpif_display.h index a2a7cd1..14efb89 100644 --- a/drivers/media/video/davinci/vpif_display.h +++ b/drivers/media/video/davinci/vpif_display.h @@ -18,7 +18,6 @@ /* Header files */ #include -#include #include #include #include