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: 15501 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TZhBQ-0004XN-1m for patchwork@linuxtv.org; Sat, 17 Nov 2012 13:07:36 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for id 1TZhBP-00018Y-D8; Sat, 17 Nov 2012 13:07:35 +0100 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 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.11.17.115419 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __DATE_TZ_RU 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' 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;