Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp316922ybk; Sat, 9 May 2020 03:52:29 -0700 (PDT) X-Google-Smtp-Source: APiQypKncJq6TidFWbnAGZseXI5Oi1QtrvYrOwxtYs5SS8pm0ukpOFO9hK5INyTX/wreUvB9pHFL X-Received: by 2002:a17:906:9249:: with SMTP id c9mr1761272ejx.173.1589021549401; Sat, 09 May 2020 03:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589021549; cv=none; d=google.com; s=arc-20160816; b=LG4bgehi+i/r3utZe74Lj9Po2iRbjrcpX3Qh7B3sCxLGUI6Vakw/JC22ZkE3PCwmO6 qikW9/2wwWnOHPPo/d8jUbmN0szRow3nBEgDgVDPRjAmrDrCoy3NogULeWyD3nskCy81 R3p/oyVXUbQxHXvAu67/QKqI1K2P9Gfh5XOuGapjerPQz+VSTFml2DPjK/Vr0IzhCHpt +w/Z5F3If+FYv6EHVzuKj5pOcB+1jl7fqjz0O8UdWCi8ZvsS47vDFWQLIevrAXJKPuYO xayK28WK+5DhTTjmgxDruxa9Ix0dUpsWpqwz5+adFkhz3Nh4rUb08QGAvjqpJLwembtE 31Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=KPkpTBXFZk8/9lQwGo/IWPlBj9LHEhRMLSp+d9p19Sc=; b=VNuPkU5zt2n7iYzDKaPT9vysGArsn3mmMBX7yMqF4K/RABn98TkkEfOgfUETL5x42l DXZG9Fw1UU3ig/4nlwL/AMt0nx3USqqCGsRhXQyjkcRL6dzXwVlQskr4d2Nu8lwiMqeh SFwpftO0zYD5uaxRxEsdAsTHF2KOR4e+Ql5HaM7LdL2hy7rQsrb9+S5Bw1orp+Sxh7TH enSLNePLaQjQr6HkeCfNnCKcPCeeVgJRsgBveN8DDu0A3gi8elmLSVGT/MFuXKarpVKz 89KzHhEGA155JNrZaT5oUzqI9To9WtXHJAZu5XsQX5VKN8ADgo1P6VimBMSsrwVtz17K 79Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Tr8y0xKX; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq22si2504177ejb.523.2020.05.09.03.52.06; Sat, 09 May 2020 03:52:29 -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=fail header.i=@gmail.com header.s=20161025 header.b=Tr8y0xKX; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728198AbgEIKsT (ORCPT + 99 others); Sat, 9 May 2020 06:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726877AbgEIKsS (ORCPT ); Sat, 9 May 2020 06:48:18 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B09BC061A0C; Sat, 9 May 2020 03:48:18 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id r26so13400642wmh.0; Sat, 09 May 2020 03:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KPkpTBXFZk8/9lQwGo/IWPlBj9LHEhRMLSp+d9p19Sc=; b=Tr8y0xKXAra5GctwNvLtRyAa1bba2IwoqopYCSTNHICLbOXZewzdKG3+udL1UvFsh0 lNiKP14hDcrxr64CbT5564HTEDJ4WPTLmMe8uAA84YyfqxxHW9/OyFLysZqeaKu5Cq8R 7ME8lRPiqLeOlcacLG/JJICWBqAuafxmgACnP7pBZsuBk1AsX7k6fcfFbIqNiQyeQmjD qKMoe6YWOalzhwiYIlNfusY9r3SqQcDtMzVex3TZFjcPhRZgxTK5s66919wAkoOey45B b030+OHYlYaXzynu/V2dsq5Vzp4+nWzFKDqLRHN1/dft0MhE/sDZeCcZIzv0cMtYvsVm yA9Q== 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:mime-version :content-transfer-encoding; bh=KPkpTBXFZk8/9lQwGo/IWPlBj9LHEhRMLSp+d9p19Sc=; b=MDWFr3C+/9aat/Rt3NnQ0v/ycjyF4knr6/PTE2+5FOmYgJDNSCvYlZ64CdAlQTpOKT dknvzNGl8caIKVrasCUNlMAUWgT6RZDTW+9Sc5aN2j0izc9hE0Ke1S1FFkgFB4V6a0Ui kxr/07xGlUxEGDNGMV43UWdKrIoplOUiD1aijT7EWd82p68mU9hO7VsruobMFHWxJ8Vo FHfGBpnrkOtnQIp0XPlHXoSo3IpSrge0k954vg6Xs5sgyryRibx4OxVDNhGUFTWb06Py UZppFE1Gjzp8gxghE4fkZiiFPEeavAQtX+Qe/i33QZdMuhB9FfVyDyEqoeQ2PNruGpCP 3Mbg== X-Gm-Message-State: AGi0PuaqL9iFjNj9NrAUyfYjKc8WwTz7nVkqdwhNlER6y8hPlI7Rb6rc JNMEcTSuHYUmNfXxZBR7lAI= X-Received: by 2002:a05:600c:24cf:: with SMTP id 15mr20121734wmu.94.1589021296925; Sat, 09 May 2020 03:48:16 -0700 (PDT) Received: from localhost.localdomain (abag125.neoplus.adsl.tpnet.pl. [83.6.170.125]) by smtp.googlemail.com with ESMTPSA id p7sm7819484wrf.31.2020.05.09.03.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 03:48:16 -0700 (PDT) From: Konrad Dybcio Cc: Konrad Dybcio , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jeffrey Hugo , zhengbin , Ben Dooks , AngeloGioacchino Del Regno , Thomas Gleixner , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [v2 PATCH] drivers: gpu: drm: Add MDP5 configuration for MSM8x36. Date: Sat, 9 May 2020 12:48:10 +0200 Message-Id: <20200509104812.202981-1-konradybcio@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change adds MDP5 configuration for MSM8x36-based SoCs, like MSM8936, 8939 and their APQ variants. The configuration is based on MSM8916's, but adds some notable features, like ad and pp blocks, along with some register changes. changes since v1: - add an ad block - add a second mixer @ 0x47000 - adjust .max_width - write a more descriptive commit message Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 76 ++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c index e3c4c250238b7..a7df8dbffdc2b 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c @@ -342,6 +342,81 @@ static const struct mdp5_cfg_hw msm8x16_config = { .max_clk = 320000000, }; +static const struct mdp5_cfg_hw msm8x36_config = { + .name = "msm8x36", + .mdp = { + .count = 1, + .base = { 0x0 }, + .caps = MDP_CAP_SMP | + 0, + }, + .smp = { + .mmb_count = 8, + .mmb_size = 10240, + .clients = { + [SSPP_VIG0] = 1, [SSPP_DMA0] = 4, + [SSPP_RGB0] = 7, [SSPP_RGB1] = 8, + }, + }, + .ctl = { + .count = 3, + .base = { 0x01000, 0x01200, 0x01400 }, + .flush_hw_mask = 0x4003ffff, + }, + .pipe_vig = { + .count = 1, + .base = { 0x04000 }, + .caps = MDP_PIPE_CAP_HFLIP | MDP_PIPE_CAP_VFLIP | + MDP_PIPE_CAP_SCALE | MDP_PIPE_CAP_CSC | + MDP_PIPE_CAP_DECIMATION, + }, + .pipe_rgb = { + .count = 2, + .base = { 0x14000, 0x16000 }, + .caps = MDP_PIPE_CAP_HFLIP | MDP_PIPE_CAP_VFLIP | + MDP_PIPE_CAP_DECIMATION, + }, + .pipe_dma = { + .count = 1, + .base = { 0x24000 }, + .caps = MDP_PIPE_CAP_HFLIP | MDP_PIPE_CAP_VFLIP, + }, + .lm = { + .count = 2, + .base = { 0x44000, 0x47000 }, + .instances = { + { .id = 0, .pp = 0, .dspp = 0, + .caps = MDP_LM_CAP_DISPLAY, }, + { .id = 1, .pp = -1, .dspp = -1, + .caps = MDP_LM_CAP_WB, }, + }, + .nb_stages = 8, + .max_width = 2560, + .max_height = 0xFFFF, + }, + .pp = { + .count = 1, + .base = { 0x70000 }, + }, + .ad = { + .count = 1, + .base = { 0x78000 }, + }, + .dspp = { + .count = 1, + .base = { 0x54000 }, + }, + .intf = { + .base = { 0x00000, 0x6a800, 0x6b000 }, + .connect = { + [0] = INTF_DISABLED, + [1] = INTF_DSI, + [2] = INTF_DSI, + }, + }, + .max_clk = 366670000, +}; + static const struct mdp5_cfg_hw msm8x94_config = { .name = "msm8x94", .mdp = { @@ -840,6 +915,7 @@ static const struct mdp5_cfg_handler cfg_handlers_v1[] = { { .revision = 2, .config = { .hw = &msm8x74v2_config } }, { .revision = 3, .config = { .hw = &apq8084_config } }, { .revision = 6, .config = { .hw = &msm8x16_config } }, + { .revision = 8, .config = { .hw = &msm8x36_config } }, { .revision = 9, .config = { .hw = &msm8x94_config } }, { .revision = 7, .config = { .hw = &msm8x96_config } }, { .revision = 11, .config = { .hw = &msm8x76_config } }, -- 2.26.2