From patchwork Mon Apr 13 21:00:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Yamin X-Patchwork-Id: 17958 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3DL6dN7022670 for ; Mon, 13 Apr 2009 21:06:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752152AbZDMVGg (ORCPT ); Mon, 13 Apr 2009 17:06:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752004AbZDMVGg (ORCPT ); Mon, 13 Apr 2009 17:06:36 -0400 Received: from mail-qy0-f117.google.com ([209.85.221.117]:35981 "EHLO mail-qy0-f117.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbZDMVGf (ORCPT ); Mon, 13 Apr 2009 17:06:35 -0400 X-Greylist: delayed 369 seconds by postgrey-1.27 at vger.kernel.org; Mon, 13 Apr 2009 17:06:35 EDT Received: by qyk15 with SMTP id 15so104761qyk.33 for ; Mon, 13 Apr 2009 14:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=eIettJ5St3L/UmorlY5ISk7OAMsrsY+nMb0RafI/jv0=; b=fgvENDIuN+BB2+UP69N6QDFFJ274WURf8fzUYLclerrzFUS7RrWGWNqZ3FgK+k+TBd VV7frmAO2qGXV/UHe3E5A4Z+sDlhjrcl1KeJqENuZvJcJc6u/oTgnRLEI3CIa49sIsZA ENrr1OJFBkjygb/3S6u2qsBuFA3QN3l0UcFLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=C3H1c4/V2n62OrZwRqaL6M23g2rtcVnwExSSsbQCqe4/aONJtppphiy67G1NfJVkww Kgj0ybFGQrA5PhVLsi+hdfYtiWqatke4HROwM8l9kY4wSJTMGbkmhVr6etsUEfqrzzx8 Zn7xM0R6Ih7VUbxaXZEFFosRHH+/fMjs2euV8= MIME-Version: 1.0 Received: by 10.220.74.71 with SMTP id t7mr6982879vcj.97.1239656422234; Mon, 13 Apr 2009 14:00:22 -0700 (PDT) In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB02FB1A1896@dbde02.ent.ti.com> References: <792f5f410904071200h1dae9024v1f2d9cbd4f1bbebc@mail.gmail.com> <5A47E75E594F054BAF48C5E4FC4B92AB02FB1A1896@dbde02.ent.ti.com> Date: Mon, 13 Apr 2009 14:00:20 -0700 X-Google-Sender-Auth: 80549bfcf69b56fe Message-ID: <792f5f410904131400v3199fa09w14c24f01f468d1c2@mail.gmail.com> Subject: Re: YUV rotation support for DSS2 - 2.6.29 [WAS Re: Hello Tomi Valkeinen, I have some questions about dss2 driver.] From: Tim Yamin To: "Shah, Hardik" Cc: "gregoire@gentil.com" , "tomi.valkeinen@nokia.com" , "linux-omap@vger.kernel.org" , "beagleboard@googlegroups.com" Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi Hardik, Thanks for fixing up the patch. I can confirm that YUV rotation is fine and patches are ready to be merged -- although the attached fix is needed as well for the userspace layer to know the correct row strides when writing YUV to the framebuffer. I'm still having VID1_FIFO_UNDERFLOW errors when I try to play rotated video on plane 1 and plane 0 is rotated as well. Do you have any ideas how to debug this further? Thanks, Tim > Hi Tomi, > If YUV rotation with frame buffer passes can you please review the patch and merge it to your latest. > > Regards, > Hardik From 4ba3f8b1d2feef00ac6c8de827262d255cebb185 Mon Sep 17 00:00:00 2001 From: Tim Yamin Date: Mon, 13 Apr 2009 13:57:42 -0700 Subject: [PATCH] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB. Signed-off-by: Tim Yamin --- drivers/video/omap2/omapfb/omapfb-main.c | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 9043265..675a7c9 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -377,10 +377,19 @@ void set_fb_fix(struct fb_info *fbi) fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi); /* used by mmap in fbmem.c */ - if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) - fix->line_length = - (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3; - else + if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) { + switch (var->nonstd) { + case OMAPFB_COLOR_YUV422: + case OMAPFB_COLOR_YUY422: + fix->line_length = + (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 2; + break; + default: + fix->line_length = + (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3; + break; + } + } else fix->line_length = (var->xres_virtual * var->bits_per_pixel) >> 3; fix->smem_start = omapfb_get_region_paddr(ofbi); @@ -689,7 +698,18 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, goto err; } - screen_width = fix->line_length / (var->bits_per_pixel >> 3); + switch (var->nonstd) { + case OMAPFB_COLOR_YUV422: + case OMAPFB_COLOR_YUY422: + if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) { + screen_width = fix->line_length + / (var->bits_per_pixel >> 2); + break; + } + default: + screen_width = fix->line_length / (var->bits_per_pixel >> 3); + break; + } ovl->get_overlay_info(ovl, &info); -- 1.5.6.3