Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp273662imm; Tue, 15 May 2018 01:15:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwdIny0hpMqBRKDHQtX4oM3NmTtb9XsitBpLwYs6ME5dPBbj+IncNcVKIrudNsZV7CsP6j X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr13716956plg.393.1526372123899; Tue, 15 May 2018 01:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526372123; cv=none; d=google.com; s=arc-20160816; b=XIJfvWSoLrnJW0/vm4/+DRE2NXcoygYGM9/pHcyyHTy5MCp1aw3aw7CInzbI2ZysLP q4/BA5Fwg9kWDbNrk6V4tYCQIPWwiNu9EsEJlq3Wd3olvmees59ugf4f+XDzwnnr1c8B l/4EywHkw2/WulcIOa+zIOWq5AwN3q6i3OQKBJ2BGoa8lQES4yY1VR0oPx76rMFNdKmH cbEegAVJqfVIxApAnK410RWNnqE0GFf0TRNdR56h4WyTAU1qGQRYp8XlmN67+aarnRcS lg/UgcuQaokhI1Czop6tgAw5L09+o+tg6A3CTb5b5Rt1XJcxnweWYQGh/siCA9t++Z/w iosQ== 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=nSvnCEbx9dtY4w9nqUqKZJ9YqR42gKjA5e9bIks6UKN16sCBpXIwQGzXsNdWCUHZAu uc7qwxCu4/018x0xqn0gV8vEC/sbcGVyCcgFFM80J+FQL+Pw+T56GccZY+WpjXda9ZWh PUXU6uqUr6x2b2fj1xwS1kNUy9uUQZYAsF9bdbXlh2F7xa2b/YRRfLHyy0X4QeKNApyn F9u4JDf7xm3CaMMG1ZItkq1+TayjGDc80VOVq+WlPEwWx5fhyUkEsYzxnGc/3Iv4ySsr 1mLowWH4upKNiVdJyoOd3uxA/uFmI2L9Sph/mYMC6N3UqhkWiisfmxC+FRsH3pNjl10j 5BJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c+6Hxpd0; 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 w18-v6si12149376pfl.359.2018.05.15.01.15.09; Tue, 15 May 2018 01:15:23 -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=c+6Hxpd0; 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 S1752599AbeEOIN0 (ORCPT + 99 others); Tue, 15 May 2018 04:13:26 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:52007 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381AbeEOH7b (ORCPT ); Tue, 15 May 2018 03:59:31 -0400 Received: by mail-wm0-f46.google.com with SMTP id j4-v6so17706759wme.1 for ; Tue, 15 May 2018 00:59:31 -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=c+6Hxpd0CTMqsaqKcC8AiHK+v5O0TaF9SFCF6yAu1GTzYEjAHnm/3M3B+L2WRCH7Y3 BlWQTGvliHq8ccpAH3lWvZAwtjMep87ZZaADF50TYdDNuoMdBJx7QsvnVRoSWRkXLiNA RISAekdtAnh9R2USGmepHeGAggmalq8tF0c0o= 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=XNlzzAgnA243Z0r5qCg5DUqlYbWjyvtLzxYzfAFLz16RsB4/s45IF12BHkh8FZbDmP cAoMLSTkm0csMHBWBTVJXcwGGnwfXZHK6EZVJ429noC96fq0yXxISiQVk+OZ7MI2JMZw C/0xxSoqGA/1lxNzSIAeuL93Ftx23oZF/lGqg7mYFORW/tUC6Us6ZVxgDj0g+Rv3Uqgu I2zHkKcjkv6WFkJ5yC9UPi42H2fOg4mZgO7KFqs4jggJv2zxX0A0kcF7LnGFKP7ucfTg 7hx16kQt4pKhaumiOO5np1h9Y97oqox2ny57wYzw5yMn/kY4bp9FeMCjJso0oegZGUMV 0G/w== X-Gm-Message-State: ALKqPwf3lI0Vv5ubb2ePvccQ6FpYiO42wfyFBv+T6C6Ut9jZA3iYjKIz EPuNPRksu5sum/isRkYDhE8AQA== X-Received: by 2002:a1c:7c05:: with SMTP id x5-v6mr6605523wmc.7.1526371170572; Tue, 15 May 2018 00:59:30 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 4-v6sm10918510wmg.40.2018.05.15.00.59.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 00:59:30 -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 v2 03/29] venus: hfi: update sequence event to handle more properties Date: Tue, 15 May 2018 10:58:33 +0300 Message-Id: <20180515075859.17217-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180515075859.17217-1-stanimir.varbanov@linaro.org> References: <20180515075859.17217-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