From patchwork Thu Aug 27 09:24:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 248441 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp9377ilg; Thu, 27 Aug 2020 02:25:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKe6ejbV7oH62APLS5Qo1pssjK9GUewEug1jTlPJWKAAw8GAXi+P3cEOvNBJCNT3HE3RWX X-Received: by 2002:a17:906:6895:: with SMTP id n21mr21197987ejr.155.1598520359318; Thu, 27 Aug 2020 02:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598520359; cv=none; d=google.com; s=arc-20160816; b=XEV0iFciuSctk+TJexmgs1nM3pa5Wy/NXo7sxOdKYhZwBbR8ZGYMYCM5mqobO8QRdV JhvFHTd4xd7Wjl2Ns2V1+RGrxeQBuUgXz2i5gJXIOzfYVYb5nDatKRQHBkN9DXVJ8Cah CE4h8IBAsVumv4rOehzxDMikdtqO8S+pX4u7dwHSLvDHjOtDb06hA/q9eIupgfX7CSaS gORzwQvdEoND53qFnnqkbRC6eoc/7srPLRvOAmtP2gXmlN7zLaTSuDDltcOPNqeQSCqr UWVDNbIaUP8PEOVHKj0oy+QaH4XwTXsq3TySCQdca1I3i1qcn7mqFlXKNTm4LiUBCKDz j/dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=26b9ZpoO3fx+ixXB0E3OlKajS9U73sb4174Ch8Q2TcY=; b=vr8aAw97jOJw8WGovjb/znYKigNtDmnpNXmkwCDBgXSubcKRIzScTdbN9zpEgF8Xgg ABd7m1vQwRp7UkmSdLqtm9jG+f6dNuEQh/KmKLtbMtcLr7TbD1RyTvTyFW8UebdKC0EB oQPn/LnArgZRP+uGQPlT7pCC5BoGzB87z7RO2aFRf0usw7ONRYiuBjHGS8C+l8VOqIzE Kp+CU72PiLBYAdZggv8iNEUxZxmKl+8BUr4j4BXYYv1KHMGqR4KmUf3PQmDIc2SaK8Wg j2OHH1822IxoAS5qGZnoFZ76oIHA1WJsAt2prG4+d9F7SOqT2EoDGaYcx4Vmz5EVmNOX M8fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ls/E8s1X"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id a2si1175359eda.380.2020.08.27.02.25.59; Thu, 27 Aug 2020 02:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ls/E8s1X"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728620AbgH0JZv (ORCPT + 15 others); Thu, 27 Aug 2020 05:25:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728604AbgH0JZX (ORCPT ); Thu, 27 Aug 2020 05:25:23 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84869C061239 for ; Thu, 27 Aug 2020 02:25:22 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id o4so4668402wrn.0 for ; Thu, 27 Aug 2020 02:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=26b9ZpoO3fx+ixXB0E3OlKajS9U73sb4174Ch8Q2TcY=; b=ls/E8s1X+JgvkrgngkXoGDYBLCEU/jJEA+wq9vnLD4z1ROImxG9aN0ogvb6jeclWv8 20L6l07nAoVQutKXQK5AdxqVwGquBLDGDEcD2UQb72SYA0L5tKMe5ISN16rp7hESErlw 7mohDDpTkLrRBP5qI0XmR8L1zWCkLZVwCTwiKK+ISw5kaXSKFDLPEZMIkt9XjWWMPbJE KaTIyiVz33QVxmBIyydw2vT4PojOv+uUJDyJKgvOlZw6MkaS7Fzc/f6DyJewjDwqsmnO cHmRKQkLHhzRrmf3ucpffgIf/ON5zzPMKhIom0nb3Qfg8LRAym4Xa/Ju2YprrH8R5K/9 BmdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=26b9ZpoO3fx+ixXB0E3OlKajS9U73sb4174Ch8Q2TcY=; b=aINVGyk4Z+pxXOAa/xUjDdnzdaYwyoDKYbhsQaHdE+AQQRrh76fdJwM46U3WOG3vSP flD+d9bRO4UzxiPptVjSSdGfzx8Xww33wpCmVv2bpVeks44luPbtZmx496vqzfClRnwV 621rJeQyaLWjJKiPfljzPVozBa7LEsKjukOwY+8NkKix+fGRygHPyl8q0cRW7ftZqftz 0IPn6kh5JmKgdqBItUrWVtkspT5KDQGk6oZ4/PF0xsTAP9XMrGDf2I24byZo/C2QwxIP WvIYd0f3NiDGQ452l2bdt/ZK8ttejMVdBNBVKqXGsaqWQ0XDvAnc1yU+fCIjMiZXgAi5 OyPg== X-Gm-Message-State: AOAM532ZDRLIiKVqyMm35l8oLo/fhe1e374pc6ZdOpzgwSn7UjJ9aZz9 wgcZbpfr/nANTpxeR6kG7UGhtA== X-Received: by 2002:adf:fb87:: with SMTP id a7mr20766902wrr.390.1598520320904; Thu, 27 Aug 2020 02:25:20 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id z203sm4357330wmc.31.2020.08.27.02.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 02:25:20 -0700 (PDT) From: Stanimir Varbanov To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Dikshita Agarwal , Vikash Garodia , Stanimir Varbanov Subject: [PATCH 12/13] venus: vdec,core: Handle picture structure event Date: Thu, 27 Aug 2020 12:24:16 +0300 Message-Id: <20200827092417.16040-13-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200827092417.16040-1-stanimir.varbanov@linaro.org> References: <20200827092417.16040-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Handle progressive/interlaced bitstream event by similar way as bit depth. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/vdec.c | 4 ++++ 2 files changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 7545f004f564..59996e96e1f2 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -371,6 +371,7 @@ struct venus_inst { union hfi_get_property hprop; unsigned int core_acquired: 1; unsigned int bit_depth; + unsigned int pic_struct; struct vb2_buffer *last_buf; }; diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index be3bcba2643b..af223da492e6 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1310,6 +1310,9 @@ static void vdec_event_change(struct venus_inst *inst, if (inst->bit_depth != ev_data->bit_depth) inst->bit_depth = ev_data->bit_depth; + if (inst->pic_struct != ev_data->pic_struct) + inst->pic_struct = ev_data->pic_struct; + dev_dbg(dev, VDBGM "event %s sufficient resources (%ux%u)\n", sufficient ? "" : "not", ev_data->width, ev_data->height); @@ -1486,6 +1489,7 @@ static int vdec_open(struct file *file) inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT; inst->core_acquired = false; inst->bit_depth = VIDC_BITDEPTH_8; + inst->pic_struct = HFI_INTERLACE_FRAME_PROGRESSIVE; init_waitqueue_head(&inst->reconf_wait); venus_helper_init_instance(inst);