Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp474458imm; Fri, 12 Oct 2018 01:10:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV613N97PNTU4i/533N897wPLIrUKzZ9HI+yW8rsJq0nOl0+CqI1iyrXJmG/9mefD6zDNR39r X-Received: by 2002:a63:f252:: with SMTP id d18-v6mr4632022pgk.2.1539331852803; Fri, 12 Oct 2018 01:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539331852; cv=none; d=google.com; s=arc-20160816; b=nw21CooKq1lkxxXlyYoRywHB6ntJFe+dS0k1tZdoNdQNVQCZs9Ug9htiJdQx5l9M4G EO/unHnHsMOzmhopwKi0Qm3dHeZnbBUKkxKA+nRz3SJydQnva+TxYy2KKoI7WwBlZJ8F Uj4dayR5QoUGprkq9qTHl5TyMu9ZAnlGDsj5fM90iMzuKBK1FOXENTtVfu36+e85gqaD I9KuMqYtWLuoy1unOSlsQD/eT3vgwH1ST6NmdRdlVvLWN6o9LA634+XtAFQ3ONIbI+at 3IZ7oEklwzTIP6+2evIv6lEQTNeAnQCoP3btsgw5I2zrp6YlvqmEbH0I6WSXmAHtBfj8 vMyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EFDAKpNV+oqfG/NL5WDbSgkRbVkdTGAFpxa1DpT+db4=; b=ojba+s36nr8Ow/E5xITmYTScbTA6/vLEiWJmEMVvrpfPgafryl9IpBZoWwWJ6Zwuyi dG5aIIuZ3s36BuzC/izCMB4UYHY4FYbM2FFpP+COqcESNDH3jfSCI9WBNVmT1V6q9/hX Hq5hGvRPKAgMl1LeS6ourF1WH7UA5hoJwa1WV+Qt2ieI9ehpqa1OZ3AtqsWrnXW1IEcf Im0tQxxG1v37sWwRwZed9Vh30tSMdrCPLp48OUcux+3ifSM2tBzDlaLxXW7zYmUQmAOf qUOvCbt55M4Lt9hhfr6lsJhP78MAQOB0YWC6l2diCEksB3CpcgDItNTNonphVOGak3L5 FhQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1w4tJhR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16-v6si548483pgb.96.2018.10.12.01.10.38; Fri, 12 Oct 2018 01:10:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1w4tJhR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727790AbeJLPlV (ORCPT + 99 others); Fri, 12 Oct 2018 11:41:21 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33289 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbeJLPlV (ORCPT ); Fri, 12 Oct 2018 11:41:21 -0400 Received: by mail-wm1-f66.google.com with SMTP id y140-v6so17470250wmd.0 for ; Fri, 12 Oct 2018 01:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EFDAKpNV+oqfG/NL5WDbSgkRbVkdTGAFpxa1DpT+db4=; b=M1w4tJhRpwY3qi42sM3ab0lm7fVMDkWKsyXBxDZAOQcfjRvdmfUiCfQ2E2Dq1Xell+ QV0JcWjayfl7FWBuPA8wZYCr2UE6C/eS1B+l0iyjI9VrOqHnTcTAhbGo/accUPaBTEwT B4lR+igI+hCp2Ui0japTuP9y44NPud/eL7Cc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EFDAKpNV+oqfG/NL5WDbSgkRbVkdTGAFpxa1DpT+db4=; b=rE/ShUruKdUM+OUsIoVRfTqW9fSEZ+gWCzN/ziMiw26iVcIk++hcK5rnCD1Demvcbx v/ylPcDSdrHIcscxhpa9lqVWq/6nzumrUiCrXax+3UAI2XnYC0Iguc9Yyi9w3DevK9Zy wY1jtNAF2d4ibfI7Q2UwOzCVHFRZ3v6D3N0zKW7/P8SELpFm0CMpNME+e53+J3yH4rPC DN9AK0xZCah7Bigick/ZLcg2TrA/ssbl/VHj8wEOaFSI90xBW/VYiToDqqxG3yaL2Nms vgKb8X9y6V8hU9g8Bzkcih5XxPQ74x0WvTnWjH0XpnH5DbkOv0DtCrhjQWBMdTYIAIRG j38A== X-Gm-Message-State: ABuFfogK2BD9GI/gbJA/KzydptEmb+k2vDtcQhzVHLZoEcMNy1x1YovH 15rCJ8JxhVU0CnGsoOW7tNhdww== X-Received: by 2002:a1c:c4f:: with SMTP id 76-v6mr4316850wmm.6.1539331804642; Fri, 12 Oct 2018 01:10:04 -0700 (PDT) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id h78-v6sm697651wmd.4.2018.10.12.01.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 01:10:03 -0700 (PDT) Subject: Re: [PATCH] media: venus: add support for key frame To: Alexandre Courbot Cc: mgottam@codeaurora.org, Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , LKML , linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org References: <1539071634-1644-1-git-send-email-mgottam@codeaurora.org> From: Stanimir Varbanov Message-ID: <40d15ea4-48e2-b2c7-1d70-68dcc1b08990@linaro.org> Date: Fri, 12 Oct 2018 11:10:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2018 11:06 AM, Alexandre Courbot wrote: > On Fri, Oct 12, 2018 at 4:37 PM Stanimir Varbanov > wrote: >> >> Hi Alex, >> >> On 10/12/2018 08:26 AM, Alexandre Courbot wrote: >>> On Tue, Oct 9, 2018 at 4:54 PM Malathi Gottam wrote: >>>> >>>> When client requests for a keyframe, set the property >>>> to hardware to generate the sync frame. >>>> >>>> Signed-off-by: Malathi Gottam >>>> --- >>>> drivers/media/platform/qcom/venus/venc_ctrls.c | 13 +++++++++++++ >>>> 1 file changed, 13 insertions(+) >>>> >>>> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c >>>> index 45910172..f332c8e 100644 >>>> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c >>>> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c >>>> @@ -81,6 +81,8 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) >>>> struct venc_controls *ctr = &inst->controls.enc; >>>> u32 bframes; >>>> int ret; >>>> + void *ptr; >>>> + u32 ptype; >>>> >>>> switch (ctrl->id) { >>>> case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: >>>> @@ -173,6 +175,14 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) >>>> >>>> ctr->num_b_frames = bframes; >>>> break; >>>> + case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME: >>>> + ptype = HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME; >>>> + ret = hfi_session_set_property(inst, ptype, ptr); >>> >>> The test bot already said it, but ptr is passed to >>> hfi_session_set_property() uninitialized. And as can be expected the >>> call returns -EINVAL on my board. >>> >>> Looking at other uses of HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME I >>> see that the packet sent to the firmware does not have room for an >>> argument, so I tried to pass NULL but got the same result. >> >> yes, because pdata cannot be NULL. I'd suggest to make a pointer to >> struct hfi_enable and pass it to the set_property function. > > FWIW I also tried doing this and got the same error, strange... > OK, when you calling the v4l control? It makes sense when you calling it, because set_property checks does the session is on START state (i.e. streamon on both queues). -- regards, Stan