diff for duplicates of <4E57D6B2.40001@gmx.de> diff --git a/a/1.txt b/N1/1.txt index 68df23f..f90b43e 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -264,7 +264,7 @@ On 08/19/2011 09:37 AM, Laurent Pinchart wrote: > > - if (!ch->info->var.nonstd) > - pixelformat = SH_MOBILE_MERAM_PF_RGB; -> - else if (ch->info->var.bits_per_pixel = 24) +> - else if (ch->info->var.bits_per_pixel == 24) > - pixelformat = SH_MOBILE_MERAM_PF_NV24; > - else > + switch (sh_mobile_format_fourcc(&ch->info->var)) { @@ -320,8 +320,8 @@ On 08/19/2011 09:37 AM, Laurent Pinchart wrote: > + info->var.xres * info->var.yres_virtual > + c_offset; > /* Set x offset */ -> - if (info->var.bits_per_pixel = 24) -> + if (sh_mobile_format_fourcc(&info->var) = V4L2_PIX_FMT_NV24) +> - if (info->var.bits_per_pixel == 24) +> + if (sh_mobile_format_fourcc(&info->var) == V4L2_PIX_FMT_NV24) > base_addr_c += 2 * var->xoffset; > else > base_addr_c += var->xoffset; @@ -484,11 +484,11 @@ You should check and adjust colorspace here as well. > unsigned int size = mode->yres * mode->xres; > > - /* NV12 buffers must have even number of lines */ -> - if ((cfg->nonstd) && cfg->bpp = 12 && +> - if ((cfg->nonstd) && cfg->bpp == 12 && > - (mode->yres & 0x1)) { > + /* NV12/NV21 buffers must have even number of lines */ -> + if ((cfg->fourcc = V4L2_PIX_FMT_NV12 || -> + cfg->fourcc = V4L2_PIX_FMT_NV21) && (mode->yres & 0x1)) { +> + if ((cfg->fourcc == V4L2_PIX_FMT_NV12 || +> + cfg->fourcc == V4L2_PIX_FMT_NV21) && (mode->yres & 0x1)) { > dev_err(dev, "yres must be multiple of 2 for YCbCr420 " > "mode.\n"); > return -EINVAL; @@ -501,11 +501,11 @@ You should check and adjust colorspace here as well. > - */ > - info->fix = sh_mobile_lcdc_fix; > - info->fix.smem_len = max_size * 2 * cfg->bpp / 8; -> - if (cfg->nonstd && cfg->bpp = 12) +> - if (cfg->nonstd && cfg->bpp == 12) > - info->fix.ypanstep = 2; > - > /* Create the mode list. */ -> if (cfg->lcd_cfg = NULL) { +> if (cfg->lcd_cfg == NULL) { > mode = &default_720p; > @@ -1508,19 +1587,38 @@ static int __devinit sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch, > */ @@ -566,8 +566,8 @@ You should check and adjust colorspace here as well. > info->fix.smem_start = ch->dma_handle; > - if (var->nonstd) > + info->fix.smem_len = max_size * var->bits_per_pixel / 8 * 2; -> + if (cfg->fourcc = V4L2_PIX_FMT_NV12 || -> + cfg->fourcc = V4L2_PIX_FMT_NV21) +> + if (cfg->fourcc == V4L2_PIX_FMT_NV12 || +> + cfg->fourcc == V4L2_PIX_FMT_NV21) > + info->fix.ypanstep = 2; > + > + if (sh_mobile_format_yuv(var)) @@ -585,7 +585,7 @@ You should check and adjust colorspace here as well. > > - /* for dual channel LCDC (MAIN + SUB) force shared bpp setting */ > + /* for dual channel LCDC (MAIN + SUB) force shared format setting */ -> if (num_channels = 2) +> if (num_channels == 2) > - priv->forced_bpp = pdata->ch[0].bpp; > + priv->forced_fourcc = pdata->ch[0].fourcc; > @@ -598,17 +598,17 @@ You should check and adjust colorspace here as well. > - dev_info(info->dev, > - "registered %s/%s as %dx%d %dbpp.\n", > - pdev->name, -> - (ch->cfg.chan = LCDC_CHAN_MAINLCD) ? +> - (ch->cfg.chan == LCDC_CHAN_MAINLCD) ? > - "mainlcd" : "sublcd", > - info->var.xres, info->var.yres, > - ch->cfg.bpp); > + dev_info(info->dev, "registered %s/%s as %dx%d %dbpp.\n", -> + pdev->name, (ch->cfg.chan = LCDC_CHAN_MAINLCD) ? +> + pdev->name, (ch->cfg.chan == LCDC_CHAN_MAINLCD) ? > + "mainlcd" : "sublcd", info->var.xres, info->var.yres, > + info->var.bits_per_pixel); > > /* deferred io mode: disable clock to save power */ -> if (info->fbdefio || info->state = FBINFO_STATE_SUSPENDED) +> if (info->fbdefio || info->state == FBINFO_STATE_SUSPENDED) > diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h > index 8101b72..fe30b75 100644 > --- a/include/video/sh_mobile_lcdc.h diff --git a/a/content_digest b/N1/content_digest index 86536c3..57c548f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01313746626-23845-1-git-send-email-laurent.pinchart@ideasonboard.com\0" "ref\01313746626-23845-4-git-send-email-laurent.pinchart@ideasonboard.com\0" "From\0Florian Tobias Schandinat <FlorianSchandinat@gmx.de>\0" - "Subject\0Re: [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based\0" + "Subject\0Re: [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based format API\0" "Date\0Fri, 26 Aug 2011 17:24:02 +0000\0" "To\0Laurent Pinchart <laurent.pinchart@ideasonboard.com>\0" "Cc\0linux-fbdev@vger.kernel.org" @@ -275,7 +275,7 @@ "> \n" "> -\t\tif (!ch->info->var.nonstd)\n" "> -\t\t\tpixelformat = SH_MOBILE_MERAM_PF_RGB;\n" - "> -\t\telse if (ch->info->var.bits_per_pixel = 24)\n" + "> -\t\telse if (ch->info->var.bits_per_pixel == 24)\n" "> -\t\t\tpixelformat = SH_MOBILE_MERAM_PF_NV24;\n" "> -\t\telse\n" "> +\t\tswitch (sh_mobile_format_fourcc(&ch->info->var)) {\n" @@ -331,8 +331,8 @@ "> \t\t\t + info->var.xres * info->var.yres_virtual\n" "> \t\t\t + c_offset;\n" "> \t\t/* Set x offset */\n" - "> -\t\tif (info->var.bits_per_pixel = 24)\n" - "> +\t\tif (sh_mobile_format_fourcc(&info->var) = V4L2_PIX_FMT_NV24)\n" + "> -\t\tif (info->var.bits_per_pixel == 24)\n" + "> +\t\tif (sh_mobile_format_fourcc(&info->var) == V4L2_PIX_FMT_NV24)\n" "> \t\t\tbase_addr_c += 2 * var->xoffset;\n" "> \t\telse\n" "> \t\t\tbase_addr_c += var->xoffset;\n" @@ -495,11 +495,11 @@ "> \t\tunsigned int size = mode->yres * mode->xres;\n" "> \n" "> -\t\t/* NV12 buffers must have even number of lines */\n" - "> -\t\tif ((cfg->nonstd) && cfg->bpp = 12 &&\n" + "> -\t\tif ((cfg->nonstd) && cfg->bpp == 12 &&\n" "> -\t\t\t\t(mode->yres & 0x1)) {\n" "> +\t\t/* NV12/NV21 buffers must have even number of lines */\n" - "> +\t\tif ((cfg->fourcc = V4L2_PIX_FMT_NV12 ||\n" - "> +\t\t cfg->fourcc = V4L2_PIX_FMT_NV21) && (mode->yres & 0x1)) {\n" + "> +\t\tif ((cfg->fourcc == V4L2_PIX_FMT_NV12 ||\n" + "> +\t\t cfg->fourcc == V4L2_PIX_FMT_NV21) && (mode->yres & 0x1)) {\n" "> \t\t\tdev_err(dev, \"yres must be multiple of 2 for YCbCr420 \"\n" "> \t\t\t\t\"mode.\\n\");\n" "> \t\t\treturn -EINVAL;\n" @@ -512,11 +512,11 @@ "> -\t */\n" "> -\tinfo->fix = sh_mobile_lcdc_fix;\n" "> -\tinfo->fix.smem_len = max_size * 2 * cfg->bpp / 8;\n" - "> -\tif (cfg->nonstd && cfg->bpp = 12)\n" + "> -\tif (cfg->nonstd && cfg->bpp == 12)\n" "> -\t\tinfo->fix.ypanstep = 2;\n" "> -\n" "> \t/* Create the mode list. */\n" - "> \tif (cfg->lcd_cfg = NULL) {\n" + "> \tif (cfg->lcd_cfg == NULL) {\n" "> \t\tmode = &default_720p;\n" "> @@ -1508,19 +1587,38 @@ static int __devinit sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch,\n" "> \t */\n" @@ -577,8 +577,8 @@ "> \tinfo->fix.smem_start = ch->dma_handle;\n" "> -\tif (var->nonstd)\n" "> +\tinfo->fix.smem_len = max_size * var->bits_per_pixel / 8 * 2;\n" - "> +\tif (cfg->fourcc = V4L2_PIX_FMT_NV12 ||\n" - "> +\t cfg->fourcc = V4L2_PIX_FMT_NV21)\n" + "> +\tif (cfg->fourcc == V4L2_PIX_FMT_NV12 ||\n" + "> +\t cfg->fourcc == V4L2_PIX_FMT_NV21)\n" "> +\t\tinfo->fix.ypanstep = 2;\n" "> +\n" "> +\tif (sh_mobile_format_yuv(var))\n" @@ -596,7 +596,7 @@ "> \n" "> -\t/* for dual channel LCDC (MAIN + SUB) force shared bpp setting */\n" "> +\t/* for dual channel LCDC (MAIN + SUB) force shared format setting */\n" - "> \tif (num_channels = 2)\n" + "> \tif (num_channels == 2)\n" "> -\t\tpriv->forced_bpp = pdata->ch[0].bpp;\n" "> +\t\tpriv->forced_fourcc = pdata->ch[0].fourcc;\n" "> \n" @@ -609,17 +609,17 @@ "> -\t\tdev_info(info->dev,\n" "> -\t\t\t \"registered %s/%s as %dx%d %dbpp.\\n\",\n" "> -\t\t\t pdev->name,\n" - "> -\t\t\t (ch->cfg.chan = LCDC_CHAN_MAINLCD) ?\n" + "> -\t\t\t (ch->cfg.chan == LCDC_CHAN_MAINLCD) ?\n" "> -\t\t\t \"mainlcd\" : \"sublcd\",\n" "> -\t\t\t info->var.xres, info->var.yres,\n" "> -\t\t\t ch->cfg.bpp);\n" "> +\t\tdev_info(info->dev, \"registered %s/%s as %dx%d %dbpp.\\n\",\n" - "> +\t\t\t pdev->name, (ch->cfg.chan = LCDC_CHAN_MAINLCD) ?\n" + "> +\t\t\t pdev->name, (ch->cfg.chan == LCDC_CHAN_MAINLCD) ?\n" "> +\t\t\t \"mainlcd\" : \"sublcd\", info->var.xres, info->var.yres,\n" "> +\t\t\t info->var.bits_per_pixel);\n" "> \n" "> \t\t/* deferred io mode: disable clock to save power */\n" - "> \t\tif (info->fbdefio || info->state = FBINFO_STATE_SUSPENDED)\n" + "> \t\tif (info->fbdefio || info->state == FBINFO_STATE_SUSPENDED)\n" "> diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h\n" "> index 8101b72..fe30b75 100644\n" "> --- a/include/video/sh_mobile_lcdc.h\n" @@ -648,4 +648,4 @@ "\n" Florian Tobias Schandinat -f0a7433a5dae8f154480c68bdf7091facd5a0719461ccfcc75672d48421b8ffe +fcd34159b1ce24760aff92c0b24ed8c2903e7cf48e554b6c27bdc166097ff0f7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.