Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp471264imm; Fri, 12 Oct 2018 01:07:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV60J9VcYNFhciZEyyNO+4u8u1fkB1fLT5KhXgyLaQbeggnIQsJQGMupTzkOzS/SpWjt8germ X-Received: by 2002:a62:1f03:: with SMTP id f3-v6mr5052857pff.168.1539331621412; Fri, 12 Oct 2018 01:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539331621; cv=none; d=google.com; s=arc-20160816; b=gQqEIxrBWhV74mCpSebbktyAdLT5Qa5yygXTrC/DWmFmXDg7iP9rQLE8Eoxzikcd0g 4HXm+Ar62I08e8lwb4Dlv0T4BuWEeJBOwaHieeTLqWE2Ro+Z5pUFDIo9sqY6zqeCm0l6 dgw7R+gI3Ktw0rFfzI0zq827z2mpQqy7zgH4+Qu94NOtVAEfPkUV8r8eOhWdmsaE/RZf ZKOcNxGBqbBk+CNDCpICwdyGAMaS9NtGpy3Vkt+adx+srH3qf1wfi2a3aRczVkRrQUEq sXWNuaKRrQzyZ0M5ktmGRaI/beW69SjeAxz8C5kmThpv8bdFekTKehK5Vre2qDfZvGXV 3aeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CEw4XGDZWJoIw+L5XfFfLpFOsrwabqrICLfsQN69xlM=; b=oukwkbzPvhSJ+czb+mYAR3K6e9/2mouWlXzun6gr7BWN5Ks12j74OUmchTiQ9BeOO7 OyPC7cLL5oM1k48EqVb0OFkWq+fdt41oJwjXJv7YtOkzoTZE7CCdLbyMiM1B+hCG/9hw effCuWLKPMdeTXJwd0/Km/a9afC7C7XtsXohC9RNML/0U2VqeRXsTxYlzAh5TQwnRtuc WVZoVsB+AK4DnoEQhEGcezfp1kmjYDUZTv461KVC+rXKIgSUeSVESUksqprh6wsvfZ2I qvrdMdRGLSBW3J02k6oMYtpIXH5G1GRTnITdkHiN2L93jxfRIPtvqu0UBzNxvXrRR/Eg TwDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BMvBw36Z; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14-v6si515445pgk.172.2018.10.12.01.06.45; Fri, 12 Oct 2018 01:07:01 -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=@chromium.org header.s=google header.b=BMvBw36Z; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727536AbeJLPhh (ORCPT + 99 others); Fri, 12 Oct 2018 11:37:37 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:40642 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbeJLPhh (ORCPT ); Fri, 12 Oct 2018 11:37:37 -0400 Received: by mail-io1-f65.google.com with SMTP id w16-v6so8608197iom.7 for ; Fri, 12 Oct 2018 01:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CEw4XGDZWJoIw+L5XfFfLpFOsrwabqrICLfsQN69xlM=; b=BMvBw36ZxXqv6aMdLQNQd2NLYGcb47R65KY5h52bcvM6EjV3d5oJJHpbo6kqxFBqDL jzyQ10tzXIyBaZgt/Xg/job3r6ni1Lmtq3NmNmY+F+SWWCrzII9XHK1Khk6uFlqvRezk +OoucSfHaRzoCKFvYZBJGiO+zJYVH3QP77Ctc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CEw4XGDZWJoIw+L5XfFfLpFOsrwabqrICLfsQN69xlM=; b=oJ3G0CtZUzKdL/uWyS6sSuvDWByMJFCw+OFR6jbJHSmxRawgEUSOmUbtMhzeYTKA8G SxE9VLw5nTKxZEMCqewefjymCUOjIHSg3OmQawNHOGhzvrrmVt5OpoaE2N0q+6V6bG78 5sqk4fyuUD2isOF6lZDh2TvZS7vqgr0Saoa6gTLo0svlonxQOZKG5bXYoOKD90b3O/8L NAUF4AHZjn/ZkjH3O3kUqZ7t+rjEG11HYetiFSBkk5zxmTZlosiDXbyFmoO+RaD6YYk8 vg/ymybCgIQ1aZcw6n2mJCHJbNDNFWbcpaMBXcGG5MHGQn1oFsxaDWXpI9yWV7mOvTgW Mpuw== X-Gm-Message-State: ABuFfojvGTUllnI+Ny3IKZW3ObR3Mj4hV/F/vPdc7Jp2IPN2iyX5CIIJ sJkWG6W98PgpgWx0iKXOJdPwFVOQjWhmFA== X-Received: by 2002:a6b:8d53:: with SMTP id p80-v6mr3183012iod.98.1539331582089; Fri, 12 Oct 2018 01:06:22 -0700 (PDT) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com. [209.85.166.179]) by smtp.gmail.com with ESMTPSA id d75-v6sm307327itc.41.2018.10.12.01.06.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 01:06:21 -0700 (PDT) Received: by mail-it1-f179.google.com with SMTP id c23-v6so17481185itd.5 for ; Fri, 12 Oct 2018 01:06:21 -0700 (PDT) X-Received: by 2002:a24:c5c7:: with SMTP id f190-v6mr3782840itg.172.1539331580712; Fri, 12 Oct 2018 01:06:20 -0700 (PDT) MIME-Version: 1.0 References: <1539071634-1644-1-git-send-email-mgottam@codeaurora.org> In-Reply-To: From: Alexandre Courbot Date: Fri, 12 Oct 2018 17:06:09 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: venus: add support for key frame To: Stanimir Varbanov Cc: mgottam@codeaurora.org, Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , LKML , linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...