Received: by 10.192.165.148 with SMTP id m20csp4622835imm; Tue, 24 Apr 2018 05:58:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48vu491gRcPxo3Gw75f4A19Lkxck3UmqyPRdltt96+ODcdJllWOsOYFdREcwehcO4NrO1Px X-Received: by 10.99.164.18 with SMTP id c18mr20272749pgf.85.1524574736432; Tue, 24 Apr 2018 05:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524574736; cv=none; d=google.com; s=arc-20160816; b=oZIy03OFZ+4IDptQB0X4KnMcVO8k7+yJlpBmQ6b6dKZsT5gk2Py1N7vuQfoQCrE2NI D/iEwdhCn0FqMPF2gyzeDuF4GEPJUOZLtoZooPnPfWM7N/jiemcU2gcg3i26WYRHm0jB fKsbPBafKdr006ecI68njLbyKT9K5nfcSoKNvOiNT3Zgh37Yxgd3nZZUAyW1SOzTZVAO 5xLQALw2TNmnwdCJnXLp3c8oYIrib4s3YyVw1g1HUFkOabjeFT09FYxyBsajr1qtvqpZ Nqn7Ck2paGKOmQGR4XDNicyEOPvFx1iH6fPE4Cug8klFB7e5MeHPXlI/fm6xIDLnSTn/ cMGg== 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=zMuKVj6QFacwz7IWhezYa4XGmFJI0qX2tfO++Xoft9Y=; b=KZ7Kpb2Y/KfSacGn7o+bwz8Z4mlCpOwABqJO65n5iPXpDG3qxasCp9N2X1ieH80lzy 0c7tfjW2sqwIO3NFYDccrMinqQFFu5HBVf8gR16IHTGqs53jXADDgJkzSasqVsTqJr2M cdZuoWdsBMEaTajsxJuxQiO2829kRwT8S+Aj/CvhpcFGGjihHbb7qbN1GrpHMUHQ0jf7 5hbesUknj/ltDCPEDYnN61RPCmT1GPIPX/SCjcbwE+O/Dxr6RxXZCRJ9V4Wnp8iRyof+ +mXCvjpLqjoFYDnvuIj089brkqGYXcNkoLUYe8STCAj6GWsXJmlp8Fv5gaLobpscov7U mC+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KruyEIc+; 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 e5si12997463pfi.67.2018.04.24.05.58.42; Tue, 24 Apr 2018 05:58:56 -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=KruyEIc+; 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 S1757907AbeDXM4Q (ORCPT + 99 others); Tue, 24 Apr 2018 08:56:16 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50930 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757792AbeDXMpK (ORCPT ); Tue, 24 Apr 2018 08:45:10 -0400 Received: by mail-wm0-f65.google.com with SMTP id t67so689254wmt.0 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=AY5r8P3hetgS/AvjGmMV8kESg+xWX/Klj0C/8lMHV2pGzvHdmoloMiHxdH2T191AYU m9jSyjON8aOYk1VJUPhDw8uOQTRvkPqJs36eLUbed1ILcFT+SGwBO1qKIjL9J8Mup2UX IgXcWi/H/rTs6j0aJqYxTtmWY2SXO+kXu1DJBrvSMq4R/U+3cy1dtw1ezvjUuTvFWDLV 8xp3/Ef2raHy6ysRRVHlrME22OR4grHFYcYs6IHosPr1uBUMntfz8vmdAfXTrqPsD8X2 Uz8NwjCMuYdyBslsnEXvGRoPaxtxwsS2Pj0n+C864Jcw4DYvchLBq9ZVoGYi+FA4ihT+ BwOQ== X-Gm-Message-State: ALQs6tD6Wgymy9lBTJ5xeV8QP6WbDl2WIZAz3CuYwTL5zIWVwEpnoqiA Kumlg7FjajYmQ1ZZUii34oujfg== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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; } -- 2.14.1