From owner-svn-src-all@freebsd.org Sun Feb 18 19:46:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80044F24D0C; Sun, 18 Feb 2018 19:46:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7A387748; Sun, 18 Feb 2018 19:46:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E74C1077E; Sun, 18 Feb 2018 19:46:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1IJkvpE046439; Sun, 18 Feb 2018 19:46:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1IJkvnq046436; Sun, 18 Feb 2018 19:46:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201802181946.w1IJkvnq046436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 18 Feb 2018 19:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r329527 - in stable/11/sys: dev/agp modules/agp X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: dev/agp modules/agp X-SVN-Commit-Revision: 329527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Feb 2018 19:46:58 -0000 Author: markj Date: Sun Feb 18 19:46:57 2018 New Revision: 329527 URL: https://svnweb.freebsd.org/changeset/base/329527 Log: MFC r320851: Add a helper function to agp(4) which installs a single GTT entry. Modified: stable/11/sys/dev/agp/agp_i810.c stable/11/sys/dev/agp/agp_i810.h stable/11/sys/modules/agp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/agp/agp_i810.c ============================================================================== --- stable/11/sys/dev/agp/agp_i810.c Sun Feb 18 19:33:28 2018 (r329526) +++ stable/11/sys/dev/agp/agp_i810.c Sun Feb 18 19:46:57 2018 (r329527) @@ -2244,6 +2244,16 @@ agp_intel_gtt_map_memory(device_t dev, vm_page_t *page return (0); } +static void +agp_intel_gtt_install_pte(device_t dev, u_int index, vm_paddr_t addr, + u_int flags) +{ + struct agp_i810_softc *sc; + + sc = device_get_softc(dev); + sc->match->driver->install_gtt_pte(dev, index, addr, flags); +} + void agp_intel_gtt_insert_sg_entries(device_t dev, struct sglist *sg_list, u_int first_entry, u_int flags) @@ -2320,6 +2330,13 @@ intel_gtt_insert_sg_entries(struct sglist *sg_list, u_ { agp_intel_gtt_insert_sg_entries(intel_agp, sg_list, first_entry, flags); +} + +void +intel_gtt_install_pte(u_int index, vm_paddr_t addr, u_int flags) +{ + + agp_intel_gtt_install_pte(intel_agp, index, addr, flags); } device_t Modified: stable/11/sys/dev/agp/agp_i810.h ============================================================================== --- stable/11/sys/dev/agp/agp_i810.h Sun Feb 18 19:33:28 2018 (r329526) +++ stable/11/sys/dev/agp/agp_i810.h Sun Feb 18 19:46:57 2018 (r329527) @@ -87,6 +87,7 @@ struct intel_gtt *intel_gtt_get(void); int intel_gtt_chipset_flush(void); void intel_gtt_unmap_memory(struct sglist *sg_list); void intel_gtt_clear_range(u_int first_entry, u_int num_entries); +void intel_gtt_install_pte(u_int index, vm_paddr_t addr, u_int flags); int intel_gtt_map_memory(vm_page_t *pages, u_int num_entries, struct sglist **sg_list); void intel_gtt_insert_sg_entries(struct sglist *sg_list, u_int pg_start, Modified: stable/11/sys/modules/agp/Makefile ============================================================================== --- stable/11/sys/modules/agp/Makefile Sun Feb 18 19:33:28 2018 (r329526) +++ stable/11/sys/modules/agp/Makefile Sun Feb 18 19:46:57 2018 (r329527) @@ -35,6 +35,7 @@ EXPORT_SYMS= agp_find_device \ .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" EXPORT_SYMS+= intel_gtt_clear_range \ intel_gtt_insert_pages \ + intel_gtt_install_pte \ intel_gtt_get \ intel_gtt_chipset_flush \ intel_gtt_unmap_memory \