Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3522199yba; Tue, 23 Apr 2019 05:25:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5qjf6LgOr9Bh8bRPgS+v2fuHT6aGqMMsq+bhpnVQzdYujtbAgwsX15nGkFnDIlgssI893 X-Received: by 2002:a62:6842:: with SMTP id d63mr2784097pfc.9.1556022333540; Tue, 23 Apr 2019 05:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556022333; cv=none; d=google.com; s=arc-20160816; b=Ubb6aocC4u2G73EZytId9noNtSYnhcw015cqt/7Zmrv8XYVNsHbbmuYJ/QZUhMZYJ4 R4rM3zzegJzUg9mllI41XORdppOP4VuE8g5kR8U/gwCpvR9a8qpTLGoZvF0SK9cHmf9F ZFA+KBIhIlK+Oqa4jhQKxiSTcAdb1DIFxcVL9HRKbtp9JK24HsS2UcNpqnAMdAVgUJnM jhUYc6ue3z3aoMmcgXcriXCkCNZ4FABxIOwwltCI4GAdG3xXid2km2cqxCQxJOXTdmD+ qX8pvXaROIXd0JnR3foYU5IhHyPACMVRFPTvrYHbW3RaaZKsLGO2rxYX+t7ym4tTEOyw EpEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OUkjPGo5lyAmNt+siaQDsEjZq+3yggXp3oRyxhsGtb4=; b=SaJtV+6pBeJ3c44+lKpLJJyQ6OCbKiOwP0kixSLV364lrWj/Iyf0S4dprEsdk/ALyL dNS4lniHh0JmCyCe+HLL/H2m+QaURTIqcIe2EIuUbKN9tBRlriLJLa8MQ4o+z5A5C+Jw vqzPt3qnErgzhfZ6al2TnBJHfq2QTgpPz3OEDmWAOZkESubJLZUk6RpyxE6ZDM2SZeln Dt6gtezW1zfZap9Xn3mggVD7YvJyU1k6YDXBnlQ1Xg2YJNKgo5261Iv3onk+dFe8gbJz QYPn0I2HDRPMwF0lfnjg/UN5kZlyRFAroWWT499rX6RZECzO6s2UVEE8XTGMPS8poq4d 5zrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="HHPdQ//n"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si15769580pfd.88.2019.04.23.05.25.17; Tue, 23 Apr 2019 05:25:33 -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=@ffwll.ch header.s=google header.b="HHPdQ//n"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbfDWMYX (ORCPT + 99 others); Tue, 23 Apr 2019 08:24:23 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:42783 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbfDWMYX (ORCPT ); Tue, 23 Apr 2019 08:24:23 -0400 Received: by mail-io1-f67.google.com with SMTP id m188so11261033ioa.9 for ; Tue, 23 Apr 2019 05:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OUkjPGo5lyAmNt+siaQDsEjZq+3yggXp3oRyxhsGtb4=; b=HHPdQ//nBkhr3jwJJ8q0Rg9bnn8GkeGgP7Il6S/ycuDQOKeu5LOjHloc9/gR9KAN+W pXJoI3wo1e97jjSAL2+jvDDsRonglUs2MtbyLpihmBiqaEo8FLC82Pupt2Y5iTLYcoOA Tm4pxKLvUDiiK8SRxOfhy6J+dJhuPk9zqtpbE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OUkjPGo5lyAmNt+siaQDsEjZq+3yggXp3oRyxhsGtb4=; b=TwqUT5nGmSNynauW1cap1ShwnxqqDvNc99EBNITrePNcXoquZH/rei9W6Qqkx9zayt UnRjfrbGm6r/YW3WJa63x6tUttPXBgaOCpcydoOo1do2e/IHHbOt6/bdNXBU6HeHL0YG vu9xyTBxDMQVqkPtX7tgyd79GyhXVqry34tJTvGY539d8jm7Hux335CgidU0ubO0R1EV cZPZ7ZAbbOALGtx4X27R5DY8OQP8otvgmdqYGaqM9MbQv94h92uudTK7t1VhB+C/dDD+ TYoLPbED3kAQQT6w4uy6GHpffP1CFnCEG65pO5u6frdULZ3ywwHd6I6d3EQSHmEBrdxO g4aA== X-Gm-Message-State: APjAAAWkdqgfq6i/c12QlP3rdJDoYhbs+uTrq9PL860ucLxFObTdMBdn 78s0oLc5BFeiP5rlLqYTpfkK0fiBtcrHacp5uJLXhwBD X-Received: by 2002:a5d:818f:: with SMTP id u15mr6477293ion.291.1556022262713; Tue, 23 Apr 2019 05:24:22 -0700 (PDT) MIME-Version: 1.0 References: <1556016490-6906-1-git-send-email-ben.davis@arm.com> In-Reply-To: <1556016490-6906-1-git-send-email-ben.davis@arm.com> From: Daniel Vetter Date: Tue, 23 Apr 2019 14:24:11 +0200 Message-ID: Subject: Re: [PATCH v3 0/2] Add writeback scaling To: Ben Davis Cc: "dri-devel@lists.freedesktop.org" , nd , Liviu Dudau , Brian Starkey , "airlied@linux.ie" , "maarten.lankhorst@linux.intel.com" , "maxime.ripard@bootlin.com" , "sean@poorly.run" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 12:48 PM Ben Davis wrote: > > Add support for scaling on writeback. To do this add writeback_dest_w > and writeback_dest_h as writeback connector properties to specify the > desired output dimensions. > Then implement downscaling on writeback for Malidp-550 and Malidp-650 > (upscaling on writeback is not supported on these devices). > > v2: Use 0 as default for writeback_w,h and so update range to use 1 as > minimum. Hm I missed that, I don't think that's good, since it prevents userspace from blindly writing back the properties it's read. We've tried hard to avoid that, since we're suggesting compositor can take a snapshot of all kms properties (including the ones they don't understand) and restore that on vt switching. Hence stuff like fence fds returning -1, and accepting -1 as NULL to make this work. tldr; I think range needs to include 0, and we need make that a special thing, maybe enforced with a drm_connector_state_compute_writeback_dst_h/w, which takes crtc_state->mode.v/hdisplay into account if the writeback_dst_h/w is 0. -Daniel > > v3: Rename properties to specify they are destination width/height. > Make sure the values from the properties are passed to > enable_memwrite rather than the framebuffer dimensions > > Ben Davis (2): > drm: Add writeback_dest_w,h properties > drm/malidp: Enable writeback scaling > > drivers/gpu/drm/arm/malidp_crtc.c | 49 +++++++++++--------- > drivers/gpu/drm/arm/malidp_crtc.h | 12 +++++ > drivers/gpu/drm/arm/malidp_drv.c | 10 +++-- > drivers/gpu/drm/arm/malidp_hw.c | 45 +++++++++++++------ > drivers/gpu/drm/arm/malidp_hw.h | 19 ++++++-- > drivers/gpu/drm/arm/malidp_mw.c | 94 ++++++++++++++++++++++++++++++--------- > drivers/gpu/drm/arm/malidp_regs.h | 1 + > drivers/gpu/drm/drm_atomic_uapi.c | 8 ++++ > drivers/gpu/drm/drm_writeback.c | 30 +++++++++++++ > include/drm/drm_connector.h | 4 ++ > include/drm/drm_mode_config.h | 10 +++++ > 11 files changed, 220 insertions(+), 62 deletions(-) > create mode 100644 drivers/gpu/drm/arm/malidp_crtc.h > > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch