Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp607846ybj; Tue, 5 May 2020 04:47:11 -0700 (PDT) X-Google-Smtp-Source: APiQypJldg9X8J8PGQ+gB7lN6V999I1qVph1TkVoxqG6PHnK6v+VRATY4sg+pfS2mG3FKKXzP7pH X-Received: by 2002:a17:906:3584:: with SMTP id o4mr2336642ejb.70.1588679231574; Tue, 05 May 2020 04:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588679231; cv=none; d=google.com; s=arc-20160816; b=EXnqk8TT3nDlFbArSR3uDH2iT6wkwlENd9elw6PsodqoTgC9z5TPd7372H0qQE05qz p9DHoLB4MsFhtor2gB8xidRpfUjaJS5zBgm5KM88E65WYPiPATDLwO1FwaDHIulAILr/ EJBW4o5852ZDMrhZYpmiuS+euHGPHf29smK5Qc+gOIQ/Ie3vZ6ZCVJtNiWmXOD1H8bV0 XcNsEIww65SXwjNAiEnQJxHUFajfMwApy/0dSprtSQ+GYwpsr9erohLeQ5uuuBqk2DGE s143SMVj8k+rci6lrvOPfoRc67wqrFtiAtvQYhslWoUNi2QzfKc/cHA9EFwZ1DsEzQHP cveg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gDB1FCBSDIhMI2SkP7ybBjhgdCbeU4g8LzJ2MyAVDVI=; b=U5k75cOJN6bW7B2uqcaiLipSiTa02dFIjZ6bh8D8/V1pfI48/7jXVx5XBLX+BT5BUJ MUze2/ZuWP8kxh3K5OM78nO0xpsl7dRh6GKCHNrg03gHbxCxj8+stVizt0mmTCKwD7Qw 5tH2+AChrE5y+3Cb7Msspx8wJ/SXErPb7SJDYwCjPzRPV5EHhhR5OD4U6EVf/JnXB/PE on4y3mfp0U+jvRk9PJTFR8hqhE+UIC+8rtbHC7Go87SgUMryCOCTAVMpAp7gjkXYE75J P6Gug4iY65yzsjDNKWTlRzhmm8oKOJmqy0bCs1IzekQd4IGZuSXnjVpb59HBu61rQUMv ekVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jAnxp34b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ot21si927712ejb.351.2020.05.05.04.46.48; Tue, 05 May 2020 04:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=jAnxp34b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728781AbgEELnL (ORCPT + 99 others); Tue, 5 May 2020 07:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728609AbgEELnL (ORCPT ); Tue, 5 May 2020 07:43:11 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15460C0610D5 for ; Tue, 5 May 2020 04:43:11 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id g13so2319230wrb.8 for ; Tue, 05 May 2020 04:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gDB1FCBSDIhMI2SkP7ybBjhgdCbeU4g8LzJ2MyAVDVI=; b=jAnxp34b09R1rsu1DzG6vMZeQfCFJ6nGgRbqd/BOjBxDY71lKg63Ii/YZBrxlAaBmA 1dX2hG1SYQIRQBz6YQcZlYip8m4wrDYyuJZke7gWZlveW1GK9CHg80uWAp9QHCXBbQT1 4pwX2Y2EV/8gQ68n7TXzYOJY+ADLuNcmSAORGDvikZmVcyqIVHu0P/wSvnR0LZHjITOw WvpRLcjEU8HLlZTtAFbbczRgLgY99Lgoi2QQUbty1ixSWUzkRCn6onk1FQbyDnXkKnKL 12KCq0IHS0gSs4jYn+PZjKdowfHKk0S3c+BNZZvJ+BUdeCGEn1ee4SukX7+RzNwK+FUF lTSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gDB1FCBSDIhMI2SkP7ybBjhgdCbeU4g8LzJ2MyAVDVI=; b=swG0YvuPa/UF0Hvv91u4w4vLauv+X9Zod3b4SkkIlhHSI3wgjlbds+kkpHBxEy9TV2 9ufTejMDMRL0I10i6BVyxhbL4TVqWcKUGMeeETDm9SD594t0427s4Tfaznu0FKJbR3gU yd3js2mgZDBfMDhi89Jtgp4j6T40JSU/COAI19mZ0OhrJN0JO4ZAzhmvuxabnndeTKRf +NyXDoBfs8aKKL75YwDGxVtU3NR/NdZpEnruIGsxaf/VMfFLJsu8gQEq1LDVcyD6p57l VXkFnsLYm1uQdcIf5Msyv5bBngx+G8z9dW3eh5hXeCWKmX8btU6OMmmblDWF+049erb0 Xyww== X-Gm-Message-State: AGi0PuYIH3Q1AiW5i3VY5TrrR9LYtaYdatWT5nHfN3ZEiehMEHDSz7Q8 w/uLA2dgzVJzGDSCC597g6Q/3y/1Hxld3A== X-Received: by 2002:adf:d089:: with SMTP id y9mr3219455wrh.26.1588678989543; Tue, 05 May 2020 04:43:09 -0700 (PDT) Received: from [192.168.1.3] (212-5-158-166.ip.btc-net.bg. [212.5.158.166]) by smtp.googlemail.com with ESMTPSA id 92sm2912351wrm.71.2020.05.05.04.43.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 May 2020 04:43:08 -0700 (PDT) Subject: Re: [PATCH 1/2] media: venus: Add support for MSM8939 To: Konrad Dybcio , skrzynka@konradybcio.pl Cc: Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200501203505.144362-1-konradybcio@gmail.com> <20200501203505.144362-2-konradybcio@gmail.com> From: Stanimir Varbanov Message-ID: <3d73eb09-ba4e-5706-042c-0d1894928a35@linaro.org> Date: Tue, 5 May 2020 14:43:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200501203505.144362-2-konradybcio@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, On 5/1/20 11:35 PM, Konrad Dybcio wrote: > Signed-off-by: Konrad Dybcio > --- > drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c > index 194b10b987672..f3a15991ac763 100644 > --- a/drivers/media/platform/qcom/venus/core.c > +++ b/drivers/media/platform/qcom/venus/core.c > @@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = { > .fwname = "qcom/venus-1.8/venus.mdt", > }; > > +static const struct freq_tbl msm8939_freq_table[] = { > + { 489600, 266670000 }, /* 1080p @ 60 */ > + { 244800, 200000000 }, /* 1080p @ 30 */ > + { 244800, 133330000 }, /* 1080p @ 30 (decode only) */ > + { 220800, 133330000 }, /* 720p @ 60 (decode only?) */ > + { 108000, 133330000 }, /* 720p @ 30*/ > + { 72000, 133330000 }, /* VGA @ 60 */ > + { 36000, 133330000 }, /* VGA @ 30 */ 133MHz is the minimum clock frequency in the GCC driver? Do you think that will change? > +}; > + > +static const struct reg_val msm8939_reg_preset[] = { > + { 0xe0020, 0x0aaaaaaa }, > + { 0xe0024, 0x0aaaaaaa }, > + { 0x80124, 0x00000003 }, > +}; > + > +static const struct venus_resources msm8939_res = { > + .freq_tbl = msm8939_freq_table, > + .freq_tbl_size = ARRAY_SIZE(msm8939_freq_table), > + .reg_tbl = msm8939_reg_preset, > + .reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset), > + .clks = { "core", "iface", "bus", }, > + .clks_num = 3, > + .max_load = 489600, /* 1080p @ 60 */ > + .hfi_version = HFI_VERSION_1XX, > + .vmem_id = VIDC_RESOURCE_NONE, > + .vmem_size = 0, > + .vmem_addr = 0, > + .dma_mask = 0xddc00000 - 1, > + .fwname = "qcom/venus-1.8/venus.mdt", > +}; > + > static const struct freq_tbl msm8996_freq_table[] = { > { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */ > { 972000, 520000000 }, /* 4k UHD @ 30 */ > @@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = { > > static const struct of_device_id venus_dt_match[] = { > { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, > + { .compatible = "qcom,msm8939-venus", .data = &msm8939_res, }, > { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, > { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, > { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, > -- regards, Stan