From patchwork Sat Nov 17 12:07:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Gusakov X-Patchwork-Id: 1759181 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E6539DF2A2 for ; Sat, 17 Nov 2012 12:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696Ab2KQMH2 (ORCPT ); Sat, 17 Nov 2012 07:07:28 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:59184 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522Ab2KQMH1 (ORCPT ); Sat, 17 Nov 2012 07:07:27 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so2421299pad.19 for ; Sat, 17 Nov 2012 04:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XWJoQr/kbRg8cLjBCc5ycCAq1rxILWvihaVy3qD+hms=; b=KDXpCAFmFxZsfyuMi3qa8IgyoeL1ACFtpt6Lf5MPcVL2yHjxUkCr+NAHyQXLFBzYsl 5f8zVVTi4SReUi3SbvOqFHMjxWfp5uSrl+GXd5Wp+K9sfXnEi4xtvolihOFKUwa6pnR1 DRtNBd8KIyCFXarPzKbpguoFf8jGu1V0/Aym3WBGGZu+7rpRaI3oP33EQgQu1t/4Mcbo arP+FqA5S2l/ZvIiqh0/nhehvJflMglkZUuqhs7ap0d25ZDbKxbb7/VVcgT11C8VGQPv iMz9WAeI06vquhJ0bAhn79ki+CyN95SPL9ms13NW3cR2xsHsbcY86Uy5AA8z2C0y3D2Q 2OVQ== MIME-Version: 1.0 Received: by 10.66.78.97 with SMTP id a1mr20871342pax.32.1353154046554; Sat, 17 Nov 2012 04:07:26 -0800 (PST) Received: by 10.68.253.36 with HTTP; Sat, 17 Nov 2012 04:07:26 -0800 (PST) In-Reply-To: <50A2CF95.4000202@gmail.com> References: <5096C561.5000108@gmail.com> <5096E8D7.4070304@gmail.com> <50979998.8090809@gmail.com> <50983CFD.2030104@gmail.com> <509AD957.5070301@gmail.com> <509CBB61.40206@gmail.com> <50A2CF95.4000202@gmail.com> Date: Sat, 17 Nov 2012 15:07:26 +0300 Message-ID: Subject: Re: S3C244X/S3C64XX SoC camera host interface driver questions From: Andrey Gusakov To: Sylwester Nawrocki Cc: Tomasz Figa , In-Bae Jeong , =?ISO-8859-1?Q?Heiko_St=FCbner?= , LMML , linux-samsung-soc Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi. Just have time to test. I apologize for delay. > I'd like to squash all the s3c-camif patches before sending upstream, > if you don't mind. And to add your Signed-off at the final patch. Ok. Squash. > I might have introduced bugs in the image effects handling, hopefully > there is none. I couldn't test it though. Could you test that on your > side with s3c64xx ? Got some error. Seems effect updated only when I set new CrCb value. Seems it's incorrect: case V4L2_CID_COLORFX: if (camif->ctrl_colorfx_cbcr->is_new) { camif->colorfx = camif->ctrl_colorfx->val; /* Set Cb, Cr */ switch (ctrl->val) { case V4L2_COLORFX_SEPIA: camif->ctrl_colorfx_cbcr->val = 0x7391; break; case V4L2_COLORFX_SET_CBCR: /* noop */ break; default: /* for V4L2_COLORFX_BW and others */ camif->ctrl_colorfx_cbcr->val = 0x8080; } } camif->colorfx_cb = camif->ctrl_colorfx_cbcr->val & 0xff; camif->colorfx_cr = camif->ctrl_colorfx_cbcr->val >> 8; break; Moving "camif->colorfx = camif->ctrl_colorfx->val;" out of condition fixes the problem, but setting CrCb value control affect all effects (sepia and BW), not only V4L2_COLORFX_SET_CBCR. Seems condition should be removed and colorfx value should be checked set on every effect change. camif->colorfx_cr = camif->ctrl_colorfx_cbcr->val >> 8; With this modification got another issue: set CRCB effect, set CRCB value, set BW effect, set CRCB effect back cause CRCB-value to be reseted to default 0x8080. Is it correct? --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index ceab03a..9c01f4f 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -1526,19 +1526,17 @@ static int s3c_camif_subdev_s_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_COLORFX: - if (camif->ctrl_colorfx_cbcr->is_new) { - camif->colorfx = camif->ctrl_colorfx->val; - /* Set Cb, Cr */ - switch (ctrl->val) { - case V4L2_COLORFX_SEPIA: - camif->ctrl_colorfx_cbcr->val = 0x7391; - break; - case V4L2_COLORFX_SET_CBCR: /* noop */ - break; - default: - /* for V4L2_COLORFX_BW and others */ - camif->ctrl_colorfx_cbcr->val = 0x8080; - } + camif->colorfx = camif->ctrl_colorfx->val; + /* Set Cb, Cr */ + switch (ctrl->val) { + case V4L2_COLORFX_SEPIA: + camif->ctrl_colorfx_cbcr->val = 0x7391; + break; + case V4L2_COLORFX_SET_CBCR: /* noop */ + break; + default: + /* for V4L2_COLORFX_BW and others */ + camif->ctrl_colorfx_cbcr->val = 0x8080; } camif->colorfx_cb = camif->ctrl_colorfx_cbcr->val & 0xff;