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@ti.com X-Patchwork-Id: 34418 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n67CfQFF005320 for ; Tue, 7 Jul 2009 12:41:26 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n67Ccr3f016480; Tue, 7 Jul 2009 07:38:58 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n67CcqUP000517; Tue, 7 Jul 2009 07:38:53 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E273B80627; Tue, 7 Jul 2009 07:38:52 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 5A39780626 for ; Tue, 7 Jul 2009 07:38:51 -0500 (CDT) 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 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 Cc: davinci-linux-open-source@linux.davincidsp.com, mchehab@infradead.org Subject: [PATCH]: v4l: DaVinci: DM646x: Updates to VPIF display driver 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 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