From patchwork Tue Apr 24 12:44:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 134104 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2201392lji; Tue, 24 Apr 2018 05:56:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/36tftOR/FLse4qYUNtez+yI4HPRzMb0B9JXW6t9JjDrlCdrvSwlW/ETc8zLaqcAtUkAgI X-Received: by 10.98.103.154 with SMTP id t26mr24125092pfj.24.1524574579233; Tue, 24 Apr 2018 05:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524574579; cv=none; d=google.com; s=arc-20160816; b=IJyxqd8PH+BgjJJb3gUn4NFciGfNVhm6ytuUukKJfMTJhrkdyoyIZ3G0e4qLhRIAKS hb4HOom7GmSNuNPX9GcuECiHH/4LZSuDHrPoEKZNSv0AVEhy+6No1gbcx/rbb4m+ma90 SJzUrGwBBAi2ZVyqlyTTAgP7+Bdn6Bbp6q2LpZISYVogVvIQPhqfdV63j532DuOABD7G DOj8tPeKi+wmuMqv6TM9DmqmcgAgcWbPPf2pmcX9UBO9F9OW9JhL+IkWRFnrs1LJCmnP s/xBX5qC8BkrrwKJJrEXgeY4h/bZiWeOmJpj8ktDHMm+UrLwkkaXvqjuh+1YoXx+o0uN OdCw== 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:arc-authentication-results; bh=DescmNCseaJ8oNlOCcs8oBn51AIBW4IjvCIIM2a0pgg=; b=pZorjOCkTYxFME3yrMIpzPwgRmOnBxm2Rm/Jb8K64tQCKRiNa3KT3nPCfc1jQvC6Xb 0tiuu/cumyumj7wVeyRfwUTmDC4UWkUqX/9ktHr2navYlpjiaugpsJrrIFy0zrbs1x4r ITHg+nnIp2UXrHqli0cteI1lGgvcPhdzTqEe5fIrutJXDlv3S1hfI58C4p42KwrQSq+o sN3f8Dvw7TwQZX2qjHtvDaCqDl82KDp1/sxLbyoA34PRDB+g5FtPfa364rk/DbAOUTyG huOx3nRWWU0bnWCaT3/gh2XpZU2PD6aybmB8R8+yKqTtlMQVvJYelgfre22sRLOJvGlT THVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KruyEIc+; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (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 5si8282391pgi.135.2018.04.24.05.56.19; Tue, 24 Apr 2018 05:56:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KruyEIc+; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757911AbeDXM4Q (ORCPT + 12 others); Tue, 24 Apr 2018 08:56:16 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52177 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757793AbeDXMpK (ORCPT ); Tue, 24 Apr 2018 08:45:10 -0400 Received: by mail-wm0-f68.google.com with SMTP id j4so691758wme.1 for ; Tue, 24 Apr 2018 05:45:09 -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=zMuKVj6QFacwz7IWhezYa4XGmFJI0qX2tfO++Xoft9Y=; b=KruyEIc+IPG2dxIs1Bgsm/v9ngSZQRTjuGGyiq9IKbL4HqWm6oKJwcFqadh6DpOgjA ODwdmvRC/Jjc93WrHzNN5BDT7hJLmi5PuhQ1dU8Y2Lw08iaN8Evyhv8fsv41j1CCOVh0 Oji/+4W/T4aMXCOBsrFSaGGPucqJ9C1w41w1k= 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=zMuKVj6QFacwz7IWhezYa4XGmFJI0qX2tfO++Xoft9Y=; b=l4EZAo+jRtkUYXN3KZPhcBOga1xwMViXJ5Rz1dNElC3Z4hPMaBd1rUMvkWAIzHaFY7 7M52qn0BftphEy9RXfortkoBAkrYTFPZAnWmecUdJZJoGNavWQcM3QkvJ0MXhDR94GWw 7JFnUYj6YBhgNGgR+xlwKHOwpu4Fnuibfe5BHBm6qJs+6fBGAzvpj7kbCp1j7xf0uNLy Tu6he5Grwam3IqQQXY+XNnAMAcbW+4pOHbHbX5QBUuP5vCrZMZsouwJVhh/698hXfXQ4 VQsJ+e0xWYOWIkkjaj3JEKHHnkr2rXDDGLmIhxyhzduudD/LGFVWwi2aL5yRfi22Tk3u BUTA== X-Gm-Message-State: ALQs6tCXYrL2KvteqQM7GP1NWdPxo4dsREc55ht6OfRQzJNYd3ehRtkg CCHn+hGRm55aMm/OfiRH0S2D7A== X-Received: by 10.28.60.194 with SMTP id j185mr12500455wma.159.1524573908826; Tue, 24 Apr 2018 05:45:08 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:08 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Stanimir Varbanov Subject: [PATCH 03/28] venus: hfi: update sequence event to handle more properties Date: Tue, 24 Apr 2018 15:44:11 +0300 Message-Id: <20180424124436.26955-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-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 HFI version 4xx can pass more properties in the sequence change event, extend the event structure with them. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.h | 9 ++++++ drivers/media/platform/qcom/venus/hfi_msgs.c | 46 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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/qcom/venus/hfi.h b/drivers/media/platform/qcom/venus/hfi.h index 5466b7d60dd0..21376d93170f 100644 --- a/drivers/media/platform/qcom/venus/hfi.h +++ b/drivers/media/platform/qcom/venus/hfi.h @@ -74,6 +74,15 @@ struct hfi_event_data { u32 tag; u32 profile; u32 level; + u32 bit_depth; + u32 pic_struct; + u32 colour_space; + u32 entropy_mode; + u32 buf_count; + struct { + u32 left, top; + u32 width, height; + } input_crop; }; /* define core states */ diff --git a/drivers/media/platform/qcom/venus/hfi_msgs.c b/drivers/media/platform/qcom/venus/hfi_msgs.c index 589e1a6b36a9..5970e9b1716b 100644 --- a/drivers/media/platform/qcom/venus/hfi_msgs.c +++ b/drivers/media/platform/qcom/venus/hfi_msgs.c @@ -25,10 +25,17 @@ static void event_seq_changed(struct venus_core *core, struct venus_inst *inst, struct hfi_msg_event_notify_pkt *pkt) { + enum hfi_version ver = core->res->hfi_version; struct hfi_event_data event = {0}; int num_properties_changed; struct hfi_framesize *frame_sz; struct hfi_profile_level *profile_level; + struct hfi_bit_depth *pixel_depth; + struct hfi_pic_struct *pic_struct; + struct hfi_colour_space *colour_info; + struct hfi_buffer_requirements *bufreq; + struct hfi_extradata_input_crop *crop; + u32 entropy_mode = 0; u8 *data_ptr; u32 ptype; @@ -69,6 +76,45 @@ static void event_seq_changed(struct venus_core *core, struct venus_inst *inst, event.level = profile_level->level; data_ptr += sizeof(*profile_level); break; + case HFI_PROPERTY_PARAM_VDEC_PIXEL_BITDEPTH: + data_ptr += sizeof(u32); + pixel_depth = (struct hfi_bit_depth *)data_ptr; + event.bit_depth = pixel_depth->bit_depth; + data_ptr += sizeof(*pixel_depth); + break; + case HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT: + data_ptr += sizeof(u32); + pic_struct = (struct hfi_pic_struct *)data_ptr; + event.pic_struct = pic_struct->progressive_only; + data_ptr += sizeof(*pic_struct); + break; + case HFI_PROPERTY_PARAM_VDEC_COLOUR_SPACE: + data_ptr += sizeof(u32); + colour_info = (struct hfi_colour_space *)data_ptr; + event.colour_space = colour_info->colour_space; + data_ptr += sizeof(*colour_info); + break; + case HFI_PROPERTY_CONFIG_VDEC_ENTROPY: + data_ptr += sizeof(u32); + entropy_mode = *(u32 *)data_ptr; + event.entropy_mode = entropy_mode; + data_ptr += sizeof(u32); + break; + case HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS: + data_ptr += sizeof(u32); + bufreq = (struct hfi_buffer_requirements *)data_ptr; + event.buf_count = HFI_BUFREQ_COUNT_MIN(bufreq, ver); + data_ptr += sizeof(*bufreq); + break; + case HFI_INDEX_EXTRADATA_INPUT_CROP: + data_ptr += sizeof(u32); + crop = (struct hfi_extradata_input_crop *)data_ptr; + event.input_crop.left = crop->left; + event.input_crop.top = crop->top; + event.input_crop.width = crop->width; + event.input_crop.height = crop->height; + data_ptr += sizeof(*crop); + break; default: break; }